mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 11:36:15 +08:00

demo37: Simplest call of the reader and writer - passthrough data demo38: Show off integration of drawings ( here using the SAP-Icons ) git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@350 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
38 lines
1.2 KiB
XML
38 lines
1.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<PROG NAME="ZDEMO_EXCEL37" VARCL="X" SUBC="1" RSTAT="T" RMAND="100" RLOAD="E" FIXPT="X" UCCHECK="X">
|
|
<textPool>
|
|
<language SPRAS="D">
|
|
<textElement ID="R" ENTRY="Xlsx-Datei lesen und dann wieder ausgeben" LENGTH="70 "/>
|
|
</language>
|
|
<language SPRAS="E">
|
|
<textElement ID="R" ENTRY="Read xlsx-file and output" LENGTH="25 "/>
|
|
</language>
|
|
</textPool>
|
|
<source>REPORT ZDEMO_EXCEL37.
|
|
|
|
DATA: excel TYPE REF TO zcl_excel,
|
|
reader TYPE REF TO zif_excel_reader.
|
|
|
|
|
|
CONSTANTS: gc_save_file_name TYPE string VALUE '37-passthrough.xlsx'.
|
|
|
|
SELECTION-SCREEN BEGIN OF BLOCK blx WITH FRAME.
|
|
PARAMETERS: p_upfile TYPE string OBLIGATORY DEFAULT 'c:\temp\Noprinterassigned.xlsx' LOWER CASE.
|
|
SELECTION-SCREEN END OF BLOCK blx.
|
|
|
|
INCLUDE zdemo_excel_outputopt_incl.
|
|
|
|
|
|
START-OF-SELECTION.
|
|
|
|
TRY.
|
|
CREATE OBJECT reader TYPE zcl_excel_reader_2007.
|
|
* CREATE OBJECT reader TYPE zcl_excel_reader_xlsm.
|
|
excel = reader->load_file( p_upfile ).
|
|
*** Create output
|
|
lcl_output=>output( excel ).
|
|
CATCH cx_root.
|
|
message 'Error reading excelfile' type 'I'.
|
|
ENDTRY.</source>
|
|
</PROG>
|