¡Caminando hacia el éxito!

Aprende en Comunidad

Avalados por :

Generación de hojas de cálculo profesionales desde ABAP con abap2gsheet - ¡Descubre cómo!

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 15 Vistas
0
Cargando...


Most business users are more confident in analyzing business data using one or more spreadsheets, sometimes linked together.

The actual releases of SAP, both SAP S / 4 and on the most recent versions of SAP ECC, allow exporting the business data in Excel format. The standard feature, used in the system to generate excel spreadsheets, has a limited operation and consequently creates simple excel sheets. These spreadsheets sometimes are not ordered without professional formatting of the layouts. Moreover, it is not possible to customize the worksheets automatically set up from the ALV lists or other tools by adding complex objects such as filters, graphs or other functionalities

It was these limitations that, years ago, inspired our team in the creation of the abap2xlsx framework, which allows developers to generate spreadsheets evolved directly from ABAP quickly.

In the latest years, the Google Suite platform has also released some API services that allow developers to generate spreadsheets (called Google Gsheet). Based on the idea of ​​the abap2xlsx framework, we decided to create a specific component that integrates directly on GSuite called ABAP2Gsheet, an Object-Oriented Framework that allows the use of the Google API.

Please note that this is the announcement of the first version, which still has many features to explore and enhance. This post is also an opportunity to collaborate with us, providing comments and feedback to enhance the code itself and adds more functionalities.

The project is available on GitHub abap2gsheet , the first version supports the following functionalities:

  • Creation of a Google Sheet document

  • Creation of a new Sheet from a template

  • Fill a single cell of the Sheet with text, the number passed directly from ABAP variables

  • Apply formats to Text and Numbers, Set colors, filters, etc.

  • Protect a range of cells

  • Read a range of cells

  • Multi Sheets generation

  • Upload an XLS document to Google Drive

  • Add a Graph to Sheet

  • Synchronize GSheet with an ALV


Developers can perform these operations with few lines of code without worrying about authentication and HTTP request formatting struggles, and here follow some examples.

Some examples


The examples explained below can be found in the yabap2google_demos package available in the project's gitHub. New features, models, and demos implemented will be collected in this section.

Hello World: Creation of a basic Google Sheet filling a cell with an ABAP string


In our first example, we want to create a simple Gsheet file into the GDrive. We want to fill in the second cell of the sheet a formatted text “Hey Google... Toc... Toc..” as shown in the following image.



With just a few lines of code, we get this spreadsheet. The source code described below is divided into two sections. The first dedicated to the connection with the G-Suite and generation of the spreadsheet



And the second where we fill the text to be inserted in the specific cell of the sheet and call the API.

Pedro Pascal
Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

Sin respuestas

No hay respuestas para mostrar No hay respuestas para mostrar Se el primero en responder

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?