diff --git a/ZA2X/PROG/ZDEMO_EXCEL2.slnk b/ZA2X/PROG/ZDEMO_EXCEL2.slnk index 1103b59..04a3fbe 100644 --- a/ZA2X/PROG/ZDEMO_EXCEL2.slnk +++ b/ZA2X/PROG/ZDEMO_EXCEL2.slnk @@ -1,10 +1,11 @@ - + + *&---------------------------------------------------------------------* *& Report ZIFE_TEST_EXCEL *& Test Styles for ABAP2XLSX @@ -111,20 +112,24 @@ START-OF-SELECTION. lo_worksheet = lo_excel->get_active_worksheet( ). lo_worksheet->title = 'Styles'. lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ). - lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = 'Bold text' ip_style = lv_style_bold_guid ). - lo_worksheet->set_cell( ip_column = 'D' ip_row = 4 ip_value = 'Underlined text' ip_style = lv_style_underline_guid ). - lo_worksheet->set_cell( ip_column = 'B' ip_row = 5 ip_value = 'Filled text' ip_style = lv_style_filled_guid ). - lo_worksheet->set_cell( ip_column = 'C' ip_row = 6 ip_value = 'Borders' ip_style = lv_style_border_guid ). + lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = 'Bold text' ip_style = lv_style_bold_guid ). + lo_worksheet->set_cell( ip_column = 'D' ip_row = 4 ip_value = 'Underlined text' ip_style = lv_style_underline_guid ). + lo_worksheet->set_cell( ip_column = 'B' ip_row = 5 ip_value = 'Filled text' ip_style = lv_style_filled_guid ). + lo_worksheet->set_cell( ip_column = 'C' ip_row = 6 ip_value = 'Borders' ip_style = lv_style_border_guid ). lo_worksheet->set_cell( ip_column = 'D' ip_row = 7 ip_value = 'I''m not a button :)' ip_style = lv_style_button_guid ). " Fill the cell and apply one style - lo_worksheet->set_cell( ip_column = 'B' ip_row = 6 ip_value = 'Filled text' ip_style = lv_style_filled_guid ). + lo_worksheet->set_cell( ip_column = 'B' ip_row = 6 ip_value = 'Filled text' ip_style = lv_style_filled_guid ). " Change the style lo_worksheet->set_cell_style( ip_column = 'B' ip_row = 6 ip_style = lv_style_filled_green_guid ). + " Add Style to an empty cell to test Fix for Issue + "#44 Exception ZCX_EXCEL thrown when style is set for an empty cell + " https://code.sdn.sap.com/spaces/abap2xlsx/tickets/44-exception-zcx_excel-thrown-when-style-is-set-for-an-empty-cell + lo_worksheet->set_cell_style( ip_column = 'E' ip_row = 6 ip_style = lv_style_filled_green_guid ). CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007. lv_file = lo_excel_writer->write_file( lo_excel ). -* Convert to binary + " Convert to binary lt_file_tab = cl_bcs_convert=>xstring_to_solix( iv_xstring = lv_file ). lv_bytecount = XSTRLEN( lv_file ).