abap2xlsx is a complete library for the creation of professional Excel (XLSX) from scratch.
Community project is shared on GitHub https://github.com/abap2xlsx/abap2xlsx and it is licensed under the Apache License, Version 2.0
Read the presentation blog to the community abap2xlsx - Generate your professional Excel spreadsheet from ABAP
What are the business advantages?
What are the technical advantages?
Official blogs:
- abap2xlsx - Generate your professional Excel spreadsheet from ABAP
- xlsx2abap - Read and edit your Excel files from ABAP
- abap2xlsx - I'm no longer a baby, I grow up and now I'm a fully featured tool
- abap2xlsx team has a present for you...
45 Comments
Stefan Riedel-Seifert
After importing the transport files:
None of the demos are running: implementations missing:
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_METHOD', was
not caught in
procedure "CONSTRUCTOR" "(METHOD)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
It was tried to call a not-implemented method
"ZIF_EXCEL_SHEET_PROTECTION~INITIALIZE" in the class "ZCL_EXCEL_WORKSHEET".
Best regards,
Stefan
Joachim Wrba
Hello Stefan,
i had the same problem.
I implemented the method in ZCL_EXCEL_WORKSHEET as an empty method.
now the examples are working.
I think there will be a fix with the correct implementation in a view days.
regards
joachim
Former Member
Hi All ,
I Have succesfully converted my reports to xlsx, but now my problem is i want to use merge cells functionality which is not supporting in my older version,now i want to download abap2xlsx nudd file but i am not getting newer version of that file & also suggest how implement merge cells in xlsx
Unknown User (cc3of7h)
Hi,
I have succesfully installed abap2xlsx . But when I want to open the generated .xlsx files to popups occurs :
Probably those are Excel - issues . How can those popups be avoided ?
regards
Jan
Gregor Wolf
Hi Jan,
can you please open an issue also providing if possible the report you're using to create the XLSX file and the created XLSX. Are you able to open the content created by the Demo reports without errors?
Best regards
Gregor
Unknown User (101r1dxv0)
Hi.
I can't download sap link file of abap2xlsx from SAP Code Exchange.
It says
Code Exchange Terms of Use
You have already accepted the Code Exchange Terms of Use and your request is being processed.
You can download them here for your reference.
Best regards.
Unknown User (hzz1vs7)
Please use the code exchange platform for comments or issue.
@Frank please do not cross post. You have to forward your request to SAP Code Exchange Team, we cannot do nothing with the code exchange TOU related error.
Unknown User (cmi9gjc)
My installation is missing class ZCL_EXCEL where I can get this class. I can activate ZCL_CHTMLB_TAB_EXCEL_EXPORT class.
Please let me know.
Gregor Wolf
Dear Ian,
please try to install the latest build or stable version from the project homepage at https://cw.sdn.sap.com/cw/groups/abap2xlsx and if it still fails let us know in the project discussion forum.
Best regards
Gregor
Prasanth Kasturi
Hi team,
I have a problem with the code in background.
My Program does not work in background but the same code works in fore ground. Could you please help me if there are any setting for the same.
Regards
Prasanth Kasturi
Gregor Wolf
Dear Prasanth,
unfortunately we don't have a crystall ball to analyze your problem. Please describe it in more detail and especially let us know if it is abap2xlsx related. Have you based your code on one of the examples?
Best regards
Gregor
Prasanth Kasturi
Hi Gregor,
Good one
..
It is related to ABAP2XLSX.
The below is the report program. When I check the data placed in the application server I find some garbage values. This is the same way I placed my code in app server in background mode but with the difference that I used the below code as my excel comprises of tables.
lo_worksheet->bind_table( ip_table = <fs_history_data>
is_table_settings = ls_table_settings
it_field_catalog = lt_fieldcat ).
REPORT zdemo_excel25.
DATA: lo_excel TYPE REF TO zcl_excel,
lo_excel_writer TYPE REF TO zif_excel_writer,
lo_worksheet TYPE REF TO zcl_excel_worksheet.
DATA: lv_file TYPE xstring.
CONSTANTS: lv_file_name TYPE string VALUE '25_HelloWorld.xlsx'.
DATA: lv_default_file_name TYPE string.
CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
EXPORTING
logical_path = 'LOCAL_TEMPORARY_FILES' " Logical path'
file_name = lv_file_name " File name
IMPORTING
file_name_with_path = lv_default_file_name. " File name with path
" Creates active sheet
CREATE OBJECT lo_excel.
" Get active sheet
lo_worksheet = lo_excel->get_active_worksheet( ).
lo_worksheet->set_title( ip_title = 'Sheet1' ).
lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
lv_file = lo_excel_writer->write_file( lo_excel ).
OPEN DATASET lv_default_file_name FOR OUTPUT IN BINARY MODE.
TRANSFER lv_file TO lv_default_file_name.
CLOSE DATASET lv_default_file_name.
Former Member
Hi, First, the project is excellent. I'm trying to password protect a workbook. I have looked at the examples in ZDEMO_EXCEL17, ZDEMO_EXCEL18. The sheet protection works great, but I am not able to get the workbook protection functioning. In Excel 2010, I am not getting the window to enter a password to read the file. Maybe I'm not using the class corectly. Please any suggestions?
lo_excel->zif_excel_book_protection~protected = zif_excel_book_protection=>c_protected.
lo_excel->zif_excel_book_protection~workbookpassword = zcl_excel_common=>encrypt_password( p_pwd ).
Ivan Femia
Hi Cindi,
the functionality is not an OOXML standard, but it is an MS Excel native implementation.
abap2xlsx aims to fully support only OOXML functionalities...
Best
Ivan
Karl Pelzer
EDIT: Problem solved by reinstalling nugget.
--------------------------------------
I have downloaded and installed the latest version of ABAB2XLSX (V 7).
Installation was quite a hassle but finally and a few short dumps later I managed it. Now, when running the demos, there are only zero-bytes files generated. While debugging DEMO1 I see that lo_worksheet is created and filled with data. But when I debug the statement lcl_output=>output( lo_excel ) I can't find any data of the worksheet. It seems like it gets lost somewhere.
This effect applies to all demos. Any idea? Many thanks in advance
Karl
Anonymous
It is best to get SAPlink-plugins_Daily.nugg (12th May 2013) SAPlink_Daily.nugg (both 31 Jan 2014)
from https://code.sdn.sap.com/code/saplink-plugins/subversion/node/blob/build/SAPlink-plugins_Daily.nugg.zip
and other 2 from SVN of https://sap.assembla.com/code/saplink/subversion/nodes#
However we have NW 701 and hit 2 problems with syntax errors in
ZCL_EXCEL_WRITER_XLSM and ZCL_EXCEL_READER_HUGE_FILE
1st got solved by https://sap.assembla.com/spaces/abap2xlsx/messages/3282273
ZCL_EXCEL_READER_HUGE_FILE has 2 "huge" problemsfor NW 701 folks like me
error = |Entry { iv_index } not found in Style Table|.
ZCL_EXCEL_READER_HUGE_FILE is perhaps new and incompatible to 701
So in the end everything is fie & working apart for the class ZCL_EXCEL_READER_HUGE_FILE
which may not needed by me
Regards
Jayanta Choudhuri
Kolkata India
Ivan Femia
Hi Jayanta,
please refer to GITHub for question https://github.com/ivanfemia/abap2xlsx.
ZCL_EXCEL_READER_HUGE_FILE is not a core file and can be deleted if you don't need the functionality.
Best
Ivan
Former Member
Hi,
I know i'm 1 year late. I am using ZCL_EXCEL now to download invoices from SAP to local directory. When I test my program using only 3-10 invoices, i am not encountering the error 'Excel was able to open the file by reparing or removing the unreadable content'. But when I tried 500 or more, i am encountering the error and the excel file does not have any entry.
My program will create an excel file with 4 sheets. In my program i used SET_TABLE method instead of SET_CELL since i do not need any formatting.
Any help would be appreciated.
Thanks,
Isaac
Ivan Femia
Hi Isaac,
please open a discussion in SCN http://scn.sap.com/community/open-source so someone can assist you easily.
Thank you
Ivan
Former Member
Hi Evan,
Whenever i execute your program iam getting an error message, Please help me to avoid this message.
"Excel found unreadable content in '~ SAP{B42E6958-3FA4-4423-9f59}.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes.
Thanks ,
Sanjay D
Gregor Wolf
Dear Sanjay,
please report problems with as much detail as possible at https://github.com/ivanfemia/abap2xlsx/issues.
Best regards
Gregor
Juan Lee
DEMOs are all empty?
I have installed and activated all the objects on the latest nugget build successful but all my demos are empty..
I reinstall the nugget again but still same issue.
why are demos all empty? where can I find the souce code for the,?
Gregor Wolf
Please report issues via the link you see in my post above.
Juan Lee
Hey Greg,
looks like the weblink you provided is down..
https://code.sdn.sap.com/spaces/abap2xlsx/tickets/custom_report/1
Gregor Wolf
I ment my post. But thank you for pointing out that the Wiki page needs also an update. Please post issues here.
Juan Lee
Thanks Greg, I have opened an issue.
https://github.com/ivanfemia/abap2xlsx/issues/449
thanks
Denner Boaventura
How do I convert this excel in pdf?
Ivan Femia
It depends on your landscape. PDF conversion is not a functionality of abap2xlsx.
For more details or support I would suggest to post on SCN a general ABAP question for PDF conversion
Ivan
saleem Baig
Above are the links are not working. I have an excel formatted template in OAOR(with colors etc), I would like to manipulate this template using ABAP and send an email using this template as an attachment. And would like to do this in Background. Can you please suggest me with any sample program or any process how to achieve this?
Gregor Wolf
Dear Saleem,
I've updated the links. Please try again.
Best regards
Gregor
Ivan Femia
Saleem any example as the possibility to send the excel generated as email attachment.
Demo15 is an example for reading an excel and writing it back.
Ivan
saleem Baig
Hi Ivan,
Thanks for your reply.
Can you please suggest or provide any demo program how to send an formatted excel(OAOR) in background? Seems that Demo15 doesn't meet my requirement.
Thanks,
Saleem.
Ivan Femia
Any demo as the functionality to send an excel in an email, so you can easily check the code.
Ivan
saleem Baig
Hi Ivan,
I tried to import the nugget ABAP2XLSX_V_7_0_6 and the log shows that the objects are installed successfully, but when I see the objects they doesn't actually exist. They even doesn't exists in Inactive Version. Please find the below log of the report. I want to have all the excel demo programs/Classes and Interfaces in my system so that I can check with report would be helpful for my requirement(Excel with email attachment in background). Can you please do the needful in solving my issue.
PROG ZDEMO_EXCEL1
PROG ZDEMO_EXCEL10
PROG ZDEMO_EXCEL11
PROG ZDEMO_EXCEL12
PROG ZDEMO_EXCEL13
PROG ZDEMO_EXCEL14
PROG ZDEMO_EXCEL15 already exists. Use overwrite orginals option to replace
PROG ZDEMO_EXCEL16
PROG ZDEMO_EXCEL29
PROG ZDEMO_EXCEL28
PROG ZDEMO_EXCEL27
PROG ZDEMO_EXCEL26 PROG
ZDEMO_EXCEL25 PROG
ZDEMO_EXCEL24 PROG
ZDEMO_EXCEL23 PROG ZDEMO_EXCEL17 PROG ZDEMO_EXCEL18 PROG ZDEMO_EXCEL19 PROG ZDEMO_EXCEL2 PROG ZDEMO_EXCEL22 PROG ZDEMO_EXCEL21 PROG ZDEMO_EXCEL20 PROG ZDEMO_EXCEL42 PROG ZDEMO_TECHED9 PROG ZDEMO_EXCEL3 PROG ZDEMO_EXCEL30 PROG ZDEMO_EXCEL31 PROG ZDEMO_EXCEL32 PROG ZDEMO_EXCEL33 PROG ZDEMO_EXCEL34 PROG ZDEMO_EXCEL35 PROG ZDEMO_EXCEL36 PROG ZDEMO_EXCEL37
Thanks,
Saleem.
saleem Baig
I'm able to upload all the programs.
Thanks for your help.
Thomas Rohmann
hi folks,
many thanks for this, it is a real help in a daily life of a consultant.
There are now XLSB files in Excel possible, unfortunate far away from XML. Is there a chance to get those loaded via ABAP as well?
Best Regards and many thanks for this, Thomas
Ivan Femia
Hi Thomas,
xlsb is an Excel Binary Workbook and is not supported via abap2xlsx.
Ivan
Ulrich Hunn
Hello,
We upgraded MS Office in December. Now each time we access an Excel-file from SAPGui/vis SAP, users get a popup-warning "Excel cannot open the file '*.xlsx' because the file format or file extension is not valid". Not critical, but extremely annoying.
The files are correct XLSX-files: If we open them directly from Excel, we don't get any popup-warnings.
Workaround:
Microsoft recommends to keep this security check on. Switching it off is currently no option.
Note:
We face this problem both when accessing XLSX-files via SAP:s OLE-function modules and via ABAP2XLSX-classes.
As you are experts om this area:
Is there an elegant way to get MS Excel to not complain any more?
Or should I raise a SAP-ticket and wait for a solution from SAP?
I appreciate any hints - thank you in advance
/ Ulrich
Elton Machado
Hi Friends,
After installed all Abap2xlsx pack everything run fine but my "special" client request for the files in XLS format and not XLSX. The problem with XLS format is that after it's created a warning excel pop-up is display with "format and extension are no the same....." ¿it's possible save it as XLS format without this pop-up?
I appreciate a lot your helpfully comment or suggestions.
Xlton
Gregor Wolf
Dear Elton,
abap2xlsx does not support XLS. It is a binary format. Ask your client to pay for the development and you're welcome to enhance abap2xlsx. But can your special client give a reason why XLS is needed instead of XLSX?
Best regards
Gregor
Elton Machado
Thanks you!!
Best regards
Elton
PRAVEEN GUPTA
Hello Gregor,
I am using ABAP2XLSX project for my requirement of formatted excel with image. But unfortunately i am unable to insert images by using drawing and SET_MEDIA method.
I am getting image in URL format and image need to be embedded in excel.
Quick help is much appreciated.
Regards,
praveen Gupta
Gregor Wolf
Hi Praveen,
have you checked https://github.com/sapmentors/abap2xlsx/issues for a solution? Have you tried the demo report? I think you need the binary data of the image. So use the ABAP HTTP Client to get the image from the URL and then you should be able to embedd it.
Best regards
Gregor
PRAVEEN GUPTA
Hi Gregor,
Thanks for your quick reply.
Yes, i have checked all the open issue on the page, and i have taken reference from ZDEMO_EXCEL16 and ZDEMO_EXCEL38.
Exactly i have done the same as given below.
ip_media_type = 'png'
ip_width = 83
ip_height = 160 ).
Unfortunately it is not embedding image into excel.
Please suggest if i have made any mistake.
Regards,
Praveen Gupta
Gregor Wolf
As a next step I would check what was generated into the XLSX (ist is just a ZIP file). If you need more support you need to hire someone who will digg deeper.