Tag Archives: excel

abap2xlsx – Business charts

In July 2010, SAP Mentor Ivan Femia released the first version of the open source project abap2xlsx that allowed ABAP developers to generate professional spreadsheets from scratch with all the advanced features that stand alone Excel editors provide like: style and cell data formats, drawings support, conditional formatting, formulas, and so on.

This project has improved the user experience compared to excel generated using SAP standard components (such as ABAP ALV, WebDynpro ALV, System menu, etc.) and it has made ABAP developers more freedom adding, for example, the ability to generate an excel from non dialog processes and to include the generated excel as email attachment. At last but not least, this framework allows the use of spreadsheets in an interactive way, making possible to read them via ABAP for further processing.

Time after time, more and more SDN community members joined into the project and improved its functionalities. The abap2xlsx project reaches a large number of contributors, so today it is almost time for the new release that will include many new features such as the use of template files for charts, very hidden sheet, many bug fixes and so on. In this blog we will focus on one of the most important news: the ability to create custom charts from scratch!

1.jpg

Yes, that’s right: with just a few simple ABAP code lines, you can create business graphics within the excel file and send it, for example, to many iPhone/iPad via a push notification or via an html email (as weekly summary for example).

2.jpg

3.jpg          4.jpg

Another interesting way to use abapxlsx charts is to generate them using abap and then catch them as an image in order to show the chart in a WebDynpro or to send it directly to a mobile device! You believe that this is not possible? It is not easy, but you can do it following these steps:

  1.      Generate the excel file with the chart as you wish via ABAP using abap2xlsx
  2.      Add a simple macro to the excel via ABAP using abap2xlsx in order to enable the excel to export the chart in an image file like this:
     
    5.jpg
     
  3.      Write a simple vbs file via ABAP in order to run the image generation like this:
     
    6.jpg
     
  4.      Save the excel file and the vbs on the SAP NetWeaver Application Server filesystem via ABAP 
     
    * Opening the File
    OPEN DATASET lv_filename FOR OUTPUT IN TEXT MODE
           MESSAGE lv_msgtxt.
    IF SY-SUBRC NE 0.
          WRITE: ‘File cannot be opened. Reason:’, lv_msgtxt.
          EXIT.
    ENDIF.* Transferring Data
    LOOP AT lt_table.
          TRANSFER lt_table-line TO FILENAME.
    ENDLOOP.* Closing the File
    CLOSE DATASET lv_filename.
     
  5.      Run the saved VBScript file via ABAP
     

    v_command = ‘cscript.exe test.vbs’.

     

    CALL ‘SYSTEM’ ID ‘COMMAND’ FIELD v_command.

     
  6.      The chart image has been generated! Get it from the Application Server filesystem via ABAP and display or send it!    
    7.jpg

abap2xlsx team has a present for you…

Yes, finally we reached the next level!

abap2xlsx is close to its first birthday and we are celebrating our 100th member on the project.

On Friday May 13th, 2011 (it is not a bad day) we reached the goal of 100th members and we would like to have fun publishing the new stable release of abap2xlsx: Release 4.0.

What is new on this release?

  • Manage all type of data validation
  • Worksheet gridlines on/off
  • Add images from MIME repository
  • Add support to other coloring options
  • Add support to hidden sheets
  • Add support to sheet hide zeros property
  • Reader reads styles
  • Diagonal border
  • Demo reports collection improvements
  • Many code improvements
  • Bug fixing

Continue reading abap2xlsx team has a present for you…

abap2xlsx – I’m no longer a baby, I grow up and now I’m a fully featured tool

I published abap2xlsx first release just few months ago, it was July 2010, and it get a lot of positive feedbacks from all of the SCN Community; today I’m here to announce the new stable version Release 3.0.

Before start listing all the new features I want to thank all the Community members that helped me to get this achievement:

CBI (Customer to Business Interaction) Excel data export

Hi guys,

Recently we had an opportunity to develop an Excel add-in to carry out custom export of data regarding the employees salary payments into a CBI (Customer to Business Interaction) format. This is a standard for the text flat file data formatting implemented by banks for batch data loading. More information could be found on www.cbi-org.eu

Continue reading CBI (Customer to Business Interaction) Excel data export

Techedge Time and Expenses report use instructions

Hi all,

here you can find a set of instructions on how to use the Time and Expenses Excel reports.

The Time Excel report can be found here:

http://www.plinky.it/blog/index.php/2009/01/27/techedge-timereport-in-excel-ii/

The Expenses Excel report can be found here:

http://www.plinky.it/blog/index.php/2009/02/01/techedge-expenses-report-in-excel/

Continue reading Techedge Time and Expenses report use instructions