10-26-2017 12:01 PM
Dear experts,
I'm trying to load file content of XLSX file into a package and trying to access parts of package but it's not working if the xlsx file was created by Libre Office but it's working if the file is MS office file.
here is my code :
l_uri = lo_parts->get_part( 2 )->get_parts( )->get_part( 3 )->get_uri( )->get_uri( ).
lo_xml_part_uri = cl_openxml_parturi=>create_from_partname( l_uri ).
lo_xml_part = lo_package->get_part_by_uri( lo_xml_part_uri ).
CH_SHARED_DTAT = lo_xml_part->get_data( ).
*Load sheet data
CLEAR l_uri.
l_uri = lo_parts->get_part( 2 )->get_parts( )->get_part( 2 )->get_uri( )->get_uri( ).
lo_xml_part_uri = cl_openxml_parturi=>create_from_partname( l_uri ).
lo_xml_part = lo_package->get_part_by_uri( lo_xml_part_uri ).
CH_SHEET_DTAT = lo_xml_part->get_data( ).
Please advise me.
Thanks,
Houriya
11-22-2017 4:03 PM
Dear community,
To load the XML data, for an Excel from LibreOffice origin, you need to read part '2' and to load the sheet data, you need to read part'1'.
10-26-2017 3:05 PM
Have you looked at using ABAP2XLSX? Soooo much easier.
Do a search on here for more info, the project is on github for download.
11-22-2017 4:04 PM
11-22-2017 4:03 PM
Dear community,
To load the XML data, for an Excel from LibreOffice origin, you need to read part '2' and to load the sheet data, you need to read part'1'.