Skip to Content
0
Former Member
Apr 29, 2014 at 09:02 PM

How to create .xlsx with a Background Image using ABAP2XLSX?

311 Views

Hello

Is there a way to create a .xlsx with a Background Image using ABAP2XLSX? Your suggestions are much appreciated.

I tried following:

CREATE OBJECT lo_excel.

CREATE OBJECT lo_excel_reader TYPE ZCL_EXCEL_READER_2007.

lo_excel = lo_excel_reader->load_file ( i_filename = '<Template xlsx FIle with Background Image>' i_from_APPLSERVER = ' ' ).


CREATE OBJECT lo_excel_writer TYPE ZCL_EXCEL_WRITER_2007.

lv_file = lo_excel_writer->write_file( lo_excel ).

lt_file_tab = cl_bcs_convert=>xstring_to_solix( iv_xstring = lv_file ).

lv_bytecount = xstrlen( lv_file ).

cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount

filename = lv_full_path

filetype = 'BIN'

CHANGING

data_tab = lt_file_tab ).

thank you!!

PP.SAP