mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 10:56:14 +08:00
commit
c3d9431b49
|
@ -35,8 +35,7 @@ DATA: lv_style_color0_guid TYPE zexcel_cell_style,
|
||||||
lv_style_color6_guid TYPE zexcel_cell_style,
|
lv_style_color6_guid TYPE zexcel_cell_style,
|
||||||
lv_style_color7_guid TYPE zexcel_cell_style,
|
lv_style_color7_guid TYPE zexcel_cell_style,
|
||||||
lv_style_credit_guid TYPE zexcel_cell_style,
|
lv_style_credit_guid TYPE zexcel_cell_style,
|
||||||
lv_style_link_guid TYPE zexcel_cell_style,
|
lv_style_link_guid TYPE zexcel_cell_style.
|
||||||
lv_style TYPE zexcel_cell_style.
|
|
||||||
|
|
||||||
DATA: lv_col_str TYPE zexcel_cell_column_alpha,
|
DATA: lv_col_str TYPE zexcel_cell_column_alpha,
|
||||||
lv_row TYPE i,
|
lv_row TYPE i,
|
||||||
|
|
|
@ -223,9 +223,7 @@ ENDMETHOD.
|
||||||
METHOD zif_excel_converter~create_fieldcatalog.
|
METHOD zif_excel_converter~create_fieldcatalog.
|
||||||
DATA: lo_salv TYPE REF TO cl_salv_table.
|
DATA: lo_salv TYPE REF TO cl_salv_table.
|
||||||
|
|
||||||
TRY.
|
zif_excel_converter~can_convert_object( io_object = io_object ).
|
||||||
zif_excel_converter~can_convert_object( io_object = io_object ).
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
ws_option = is_option.
|
ws_option = is_option.
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ method load.
|
||||||
data: lo_minor_iterator type ref to if_ixml_node_iterator.
|
data: lo_minor_iterator type ref to if_ixml_node_iterator.
|
||||||
data: lo_minor_element type ref to if_ixml_element.
|
data: lo_minor_element type ref to if_ixml_element.
|
||||||
data: ls_font type t_font.
|
data: ls_font type t_font.
|
||||||
check io_font_scheme is not initial.
|
check io_font_scheme is not initial.
|
||||||
clear font_scheme.
|
clear font_scheme.
|
||||||
font_scheme-name = io_font_scheme->get_attribute( name = c_name ).
|
font_scheme-name = io_font_scheme->get_attribute( name = c_name ).
|
||||||
lo_scheme_children = io_font_scheme->get_children( ).
|
lo_scheme_children = io_font_scheme->get_children( ).
|
||||||
|
|
|
@ -3838,9 +3838,7 @@ CLASS ZCL_EXCEL_WORKSHEET IMPLEMENTATION.
|
||||||
|
|
||||||
method GET_COLUMN.
|
method GET_COLUMN.
|
||||||
|
|
||||||
data: LO_COLUMN_ITERATOR type ref to CL_OBJECT_COLLECTION_ITERATOR,
|
data: LV_COLUMN type ZEXCEL_CELL_COLUMN.
|
||||||
LO_COLUMN type ref to ZCL_EXCEL_COLUMN,
|
|
||||||
LV_COLUMN type ZEXCEL_CELL_COLUMN.
|
|
||||||
|
|
||||||
LV_COLUMN = ZCL_EXCEL_COMMON=>CONVERT_COLUMN2INT( IP_COLUMN ).
|
LV_COLUMN = ZCL_EXCEL_COMMON=>CONVERT_COLUMN2INT( IP_COLUMN ).
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ INITIALIZATION.
|
||||||
START-OF-SELECTION.
|
START-OF-SELECTION.
|
||||||
|
|
||||||
DATA: lo_excel TYPE REF TO zcl_excel,
|
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,
|
lo_worksheet TYPE REF TO zcl_excel_worksheet,
|
||||||
lo_column TYPE REF TO zcl_excel_column,
|
lo_column TYPE REF TO zcl_excel_column,
|
||||||
lo_row TYPE REF TO zcl_excel_row,
|
lo_row TYPE REF TO zcl_excel_row,
|
||||||
|
@ -61,10 +60,6 @@ START-OF-SELECTION.
|
||||||
DATA: lo_style_center TYPE REF TO zcl_excel_style,
|
DATA: lo_style_center TYPE REF TO zcl_excel_style,
|
||||||
lv_style_center_guid TYPE zexcel_cell_style.
|
lv_style_center_guid TYPE zexcel_cell_style.
|
||||||
|
|
||||||
DATA: lv_file TYPE xstring,
|
|
||||||
lv_bytecount TYPE i,
|
|
||||||
lt_file_tab TYPE solix_tab.
|
|
||||||
|
|
||||||
DATA: lv_full_path TYPE string,
|
DATA: lv_full_path TYPE string,
|
||||||
image_descr_path TYPE string,
|
image_descr_path TYPE string,
|
||||||
lv_file_separator TYPE c.
|
lv_file_separator TYPE c.
|
||||||
|
@ -201,7 +196,7 @@ START-OF-SELECTION.
|
||||||
" Get active sheet
|
" Get active sheet
|
||||||
lo_worksheet = lo_excel->get_active_worksheet( ).
|
lo_worksheet = lo_excel->get_active_worksheet( ).
|
||||||
ELSE.
|
ELSE.
|
||||||
lo_worksheet = lo_excel->add_new_worksheet( ).
|
lo_worksheet = lo_excel->add_new_worksheet( ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
lo_worksheet->zif_excel_sheet_properties~selected = zif_excel_sheet_properties=>c_selected.
|
lo_worksheet->zif_excel_sheet_properties~selected = zif_excel_sheet_properties=>c_selected.
|
||||||
|
|
|
@ -199,10 +199,6 @@ START-OF-SELECTION.
|
||||||
|
|
||||||
DATA: row TYPE zexcel_cell_row.
|
DATA: row TYPE zexcel_cell_row.
|
||||||
|
|
||||||
DATA: lv_file TYPE xstring,
|
|
||||||
lv_bytecount TYPE i,
|
|
||||||
lt_file_tab TYPE solix_tab.
|
|
||||||
|
|
||||||
DATA: lt_field_catalog TYPE zexcel_t_fieldcatalog,
|
DATA: lt_field_catalog TYPE zexcel_t_fieldcatalog,
|
||||||
ls_table_settings TYPE zexcel_s_table_settings.
|
ls_table_settings TYPE zexcel_s_table_settings.
|
||||||
|
|
||||||
|
|
|
@ -12,17 +12,17 @@ REPORT zdemo_excel43.
|
||||||
"Locally created Structure, which should be equal to the excels structure
|
"Locally created Structure, which should be equal to the excels structure
|
||||||
"
|
"
|
||||||
TYPES: BEGIN OF lty_excel_s,
|
TYPES: BEGIN OF lty_excel_s,
|
||||||
dummy TYPE dummy.
|
dummy TYPE dummy.
|
||||||
TYPES: END OF lty_excel_s.
|
TYPES: END OF lty_excel_s.
|
||||||
|
|
||||||
DATA lt_tab TYPE TABLE OF lty_excel_s.
|
DATA lt_tab TYPE TABLE OF lty_excel_s.
|
||||||
DATA: lt_filetable TYPE filetable,
|
DATA: lt_filetable TYPE filetable,
|
||||||
ls_filetable TYPE file_table.
|
ls_filetable TYPE file_table.
|
||||||
DATA lv_subrc TYPE i.
|
DATA lv_subrc TYPE i.
|
||||||
DATA: lo_excel TYPE REF TO zcl_excel,
|
DATA: lo_excel TYPE REF TO zcl_excel,
|
||||||
lo_reader TYPE REF TO zif_excel_reader,
|
lo_reader TYPE REF TO zif_excel_reader,
|
||||||
lo_worksheet TYPE REF TO zcl_excel_worksheet,
|
lo_worksheet TYPE REF TO zcl_excel_worksheet,
|
||||||
lo_salv TYPE REF TO cl_salv_table.
|
lo_salv TYPE REF TO cl_salv_table.
|
||||||
|
|
||||||
"
|
"
|
||||||
"Ask User to choose a path
|
"Ask User to choose a path
|
||||||
|
@ -42,13 +42,11 @@ IF sy-subrc <> 0.
|
||||||
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
|
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
|
||||||
ELSE.
|
ELSE.
|
||||||
CREATE OBJECT lo_reader TYPE zcl_excel_reader_2007.
|
CREATE OBJECT lo_reader TYPE zcl_excel_reader_2007.
|
||||||
TRY.
|
LOOP AT lt_filetable INTO ls_filetable.
|
||||||
LOOP AT lt_filetable INTO ls_filetable.
|
lo_excel = lo_reader->load_file( ls_filetable-filename ).
|
||||||
lo_excel = lo_reader->load_file( ls_filetable-filename ).
|
lo_worksheet = lo_excel->get_worksheet_by_index( iv_index = 1 ).
|
||||||
lo_worksheet = lo_excel->get_worksheet_by_index( iv_index = 1 ).
|
lo_worksheet->get_table( IMPORTING et_table = lt_tab ).
|
||||||
lo_worksheet->get_table( IMPORTING et_table = lt_tab ).
|
ENDLOOP.
|
||||||
ENDLOOP.
|
|
||||||
ENDTRY.
|
|
||||||
ENDIF.
|
ENDIF.
|
||||||
"
|
"
|
||||||
"Do the presentation stuff
|
"Do the presentation stuff
|
||||||
|
|
Loading…
Reference in New Issue
Block a user