diff --git a/ZA2X/CLAS/ZCL_EXCEL_COMMON.slnk b/ZA2X/CLAS/ZCL_EXCEL_COMMON.slnk index 87447d7..a5c0f20 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_COMMON.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_COMMON.slnk @@ -2132,7 +2132,7 @@ endmethod. - method RECURSIVE_STRUCT_TO_CLASS. + METHOD recursive_struct_to_class. " # issue 139 * is working for me - but after looking through this coding I guess * I'll rewrite this to a version w/o recursion @@ -2172,6 +2172,13 @@ endmethod. CASE wa_component-type_kind. WHEN cl_abap_structdescr=>typekind_struct1 OR cl_abap_structdescr=>typekind_struct2. " Structure --> use recursion + " To avoid dump with attribute GRADTYPE of class ZCL_EXCEL_STYLE_FILL + " quick and really dirty fix -> check the attribute name + " Border has to be initialized somewhere else + IF wa_component-name EQ 'GRADTYPE'. + flag_class = abap_false. + ENDIF. + IF flag_class = abap_true AND <attribute> IS INITIAL. * Only borders will be passed as unbound references. But since we want to set a value we have to create an instance CREATE OBJECT o_border. @@ -2190,7 +2197,7 @@ endmethod. ENDCASE. ENDLOOP. -endmethod. +ENDMETHOD. diff --git a/ZA2X/CLAS/ZCL_EXCEL_STYLE_FILL.slnk b/ZA2X/CLAS/ZCL_EXCEL_STYLE_FILL.slnk index 1128a99..e2d4061 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_STYLE_FILL.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_STYLE_FILL.slnk @@ -1,50 +1,5 @@ - - - class ZCL_EXCEL_STYLE_FILL definition - public - final - create public . - -public section. -*"* public components of class ZCL_EXCEL_STYLE_FILL -*"* do not include other source files here!!! - - constants C_FILL_NONE type ZEXCEL_FILL_TYPE value 'none'. "#EC NOTEXT - constants C_FILL_SOLID type ZEXCEL_FILL_TYPE value 'solid'. "#EC NOTEXT - constants C_FILL_GRADIENT_LINEAR type ZEXCEL_FILL_TYPE value 'linear'. "#EC NOTEXT - constants C_FILL_GRADIENT_PATH type ZEXCEL_FILL_TYPE value 'path'. "#EC NOTEXT - constants C_FILL_PATTERN_DARKDOWN type ZEXCEL_FILL_TYPE value 'darkDown'. "#EC NOTEXT - constants C_FILL_PATTERN_DARKGRAY type ZEXCEL_FILL_TYPE value 'darkGray'. "#EC NOTEXT - constants C_FILL_PATTERN_DARKGRID type ZEXCEL_FILL_TYPE value 'darkGrid'. "#EC NOTEXT - constants C_FILL_PATTERN_DARKHORIZONTAL type ZEXCEL_FILL_TYPE value 'darkHorizontal'. "#EC NOTEXT - constants C_FILL_PATTERN_DARKTRELLIS type ZEXCEL_FILL_TYPE value 'darkTrellis'. "#EC NOTEXT - constants C_FILL_PATTERN_DARKUP type ZEXCEL_FILL_TYPE value 'darkUp'. "#EC NOTEXT - constants C_FILL_PATTERN_DARKVERTICAL type ZEXCEL_FILL_TYPE value 'darkVertical'. "#EC NOTEXT - constants C_FILL_PATTERN_GRAY0625 type ZEXCEL_FILL_TYPE value 'gray0625'. "#EC NOTEXT - constants C_FILL_PATTERN_GRAY125 type ZEXCEL_FILL_TYPE value 'gray125'. "#EC NOTEXT - constants C_FILL_PATTERN_LIGHTDOWN type ZEXCEL_FILL_TYPE value 'lightDown'. "#EC NOTEXT - constants C_FILL_PATTERN_LIGHTGRAY type ZEXCEL_FILL_TYPE value 'lightGray'. "#EC NOTEXT - constants C_FILL_PATTERN_LIGHTGRID type ZEXCEL_FILL_TYPE value 'lightGrid'. "#EC NOTEXT - constants C_FILL_PATTERN_LIGHTHORIZONTAL type ZEXCEL_FILL_TYPE value 'lightHorizontal'. "#EC NOTEXT - constants C_FILL_PATTERN_LIGHTTRELLIS type ZEXCEL_FILL_TYPE value 'lightTrellis'. "#EC NOTEXT - constants C_FILL_PATTERN_LIGHTUP type ZEXCEL_FILL_TYPE value 'lightUp'. "#EC NOTEXT - constants C_FILL_PATTERN_LIGHTVERTICAL type ZEXCEL_FILL_TYPE value 'lightVertical'. "#EC NOTEXT - constants C_FILL_PATTERN_MEDIUMGRAY type ZEXCEL_FILL_TYPE value 'mediumGray'. "#EC NOTEXT - data FILLTYPE type ZEXCEL_FILL_TYPE . - data ROTATION type ZEXCEL_ROTATION . - data FGCOLOR type ZEXCEL_S_STYLE_COLOR . - data BGCOLOR type ZEXCEL_S_STYLE_COLOR . - - methods CONSTRUCTOR . - methods GET_STRUCTURE - returning - value(ES_FILL) type ZEXCEL_S_STYLE_FILL . - *"* protected components of class ZABAP_EXCEL_STYLE_FONT -*"* do not include other source files here!!! -protected section. - *"* private components of class ZCL_EXCEL_STYLE_FILL -*"* do not include other source files here!!! -private section. + + *"* local class implementation for public class *"* use this source file for the implementation part of *"* local helper classes @@ -53,48 +8,160 @@ private section. *"* implementation or private method's signature *"* use this source file for any macro definitions you need *"* in the implementation part of the class - - - - - - - - - - - - - - - - - - - - - - - - - - - method CONSTRUCTOR. - filltype = zcl_excel_style_fill=>c_fill_none. - fgcolor-theme = zcl_excel_style_color=>c_theme_not_set. - fgcolor-indexed = zcl_excel_style_color=>c_indexed_not_set. - bgcolor-theme = zcl_excel_style_color=>c_theme_not_set. - bgcolor-indexed = zcl_excel_style_color=>c_indexed_sys_foreground. - rotation = 0. -endmethod. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + method build_gradient. + check check_filltype_is_gradient( ) eq abap_true. + case filltype. + when c_fill_gradient_horizontal90. + gradtype-degree = '90'. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + when c_fill_gradient_horizontal270. + gradtype-degree = '270'. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + when c_fill_gradient_horizontalb. + gradtype-degree = '90'. + gradtype-position1 = '0'. + gradtype-position2 = '0.5'. + gradtype-position3 = '1'. + when c_fill_gradient_vertical. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + when c_fill_gradient_fromcenter. + gradtype-type = c_fill_gradient_path. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + gradtype-bottom = '0.5'. + gradtype-top = '0.5'. + gradtype-left = '0.5'. + gradtype-right = '0.5'. + when c_fill_gradient_diagonal45. + gradtype-degree = '45'. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + when c_fill_gradient_diagonal45b. + gradtype-degree = '45'. + gradtype-position1 = '0'. + gradtype-position2 = '0.5'. + gradtype-position3 = '1'. + when c_fill_gradient_diagonal135. + gradtype-degree = '135'. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + when c_fill_gradient_diagonal135b. + gradtype-degree = '135'. + gradtype-position1 = '0'. + gradtype-position2 = '0.5'. + gradtype-position3 = '1'. + when c_fill_gradient_cornerlt. + gradtype-type = c_fill_gradient_path. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + when c_fill_gradient_cornerlb. + gradtype-type = c_fill_gradient_path. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + gradtype-bottom = '1'. + gradtype-top = '1'. + when c_fill_gradient_cornerrt. + gradtype-type = c_fill_gradient_path. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + gradtype-left = '1'. + gradtype-right = '1'. + when c_fill_gradient_cornerrb. + gradtype-type = c_fill_gradient_path. + gradtype-position1 = '0'. + gradtype-position2 = '1'. + gradtype-bottom = '0.5'. + gradtype-top = '0.5'. + gradtype-left = '0.5'. + gradtype-right = '0.5'. + endcase. + + endmethod. "build_gradient - - - method GET_STRUCTURE. - es_fill-rotation = me->rotation. - es_fill-filltype = me->filltype. - es_fill-fgColor = me->fgColor. - es_fill-bgColor = me->bgColor. -endmethod. + + + method check_filltype_is_gradient. + case filltype. + when c_fill_gradient_horizontal90 or + c_fill_gradient_horizontal270 or + c_fill_gradient_horizontalb or + c_fill_gradient_vertical or + c_fill_gradient_fromcenter or + c_fill_gradient_diagonal45 or + c_fill_gradient_diagonal45b or + c_fill_gradient_diagonal135 or + c_fill_gradient_diagonal135b or + c_fill_gradient_cornerlt or + c_fill_gradient_cornerlb or + c_fill_gradient_cornerrt or + c_fill_gradient_cornerrb. + rv_is_gradient = abap_true. + endcase. + endmethod. "check_filltype_is_gradient + + + method constructor. + filltype = zcl_excel_style_fill=>c_fill_none. + fgcolor-theme = zcl_excel_style_color=>c_theme_not_set. + fgcolor-indexed = zcl_excel_style_color=>c_indexed_not_set. + bgcolor-theme = zcl_excel_style_color=>c_theme_not_set. + bgcolor-indexed = zcl_excel_style_color=>c_indexed_sys_foreground. + rotation = 0. + + endmethod. "CONSTRUCTOR + + + + method get_structure. + es_fill-rotation = me->rotation. + es_fill-filltype = me->filltype. + es_fill-fgcolor = me->fgcolor. + es_fill-bgcolor = me->bgcolor. + me->build_gradient( ). + es_fill-gradtype = me->gradtype. + endmethod. "GET_STRUCTURE diff --git a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk index 859990c..4d8f172 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk @@ -1,15 +1,15 @@ - - - - - - - - - - + + + *"* local class implementation for public class *"* use this source file for the implementation part of *"* local helper classes @@ -3258,13 +3258,22 @@ ENDMETHOD. + + + + + + + + + @@ -3550,6 +3559,18 @@ ENDMETHOD. fill_bgcolor_theme fill-bgcolor-theme, fill_bgcolor_tint fill-bgcolor-tint, + fill_gradtype_type fill-gradtype-TYPE, + fill_gradtype_degree fill-gradtype-DEGREE, + fill_gradtype_bottom fill-gradtype-BOTTOM, + fill_gradtype_left fill-gradtype-LEFT, + fill_gradtype_top fill-gradtype-TOP, + fill_gradtype_right fill-gradtype-RIGHT, + fill_gradtype_position1 fill-gradtype-POSITION1, + fill_gradtype_position2 fill-gradtype-POSITION2, + fill_gradtype_position3 fill-gradtype-POSITION3, + + + borders_diagonal_mode borders-diagonal_mode, alignment_horizontal alignment-horizontal, alignment_vertical alignment-vertical, diff --git a/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk b/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk index 5f1415a..eb50abe 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk @@ -1,6 +1,6 @@ - + *"* local class implementation for public class *"* use this source file for the implementation part of *"* local helper classes @@ -15,21 +15,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + method ZIF_EXCEL_WRITER~WRITE_FILE. me->excel = io_excel. @@ -235,7 +235,7 @@ ENDMETHOD. ENDWHILE. * Second to last step: Allow further information put into the zip archive by child classes - add_further_data_to_zip( lo_zip ). + me->add_further_data_to_zip( lo_zip ). ********************************************************************** * Last step: Create the final zip @@ -4730,7 +4730,12 @@ ENDMETHOD. lc_xml_attr_diagonalup TYPE string VALUE 'diagonalUp', lc_xml_attr_diagonaldown TYPE string VALUE 'diagonalDown', " Node namespace - lc_xml_node_ns TYPE string VALUE 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'. + lc_xml_node_ns TYPE string VALUE 'http://schemas.openxmlformats.org/spreadsheetml/2006/main', + lc_xml_attr_type TYPE string value 'type', + lc_xml_attr_bottom TYPE string value 'bottom', + lc_xml_attr_top TYPE string value 'top', + lc_xml_attr_right TYPE string value 'right', + lc_xml_attr_left TYPE string value 'left'. DATA: lo_ixml TYPE REF TO if_ixml, lo_document TYPE REF TO if_ixml_document, @@ -5048,32 +5053,140 @@ ENDMETHOD. LOOP AT lt_fills INTO ls_fill. lo_element_fill = lo_document->create_simple_element( name = lc_xml_node_fill parent = lo_document ). - "pattern - lo_sub_element = lo_document->create_simple_element( name = lc_xml_node_patternfill - parent = lo_document ). - lv_value = ls_fill-filltype. - lo_sub_element->set_attribute_ns( name = lc_xml_attr_patterntype - value = lv_value ). - " fgcolor - create_xl_styles_color_node( - io_document = lo_document - io_parent = lo_sub_element - is_color = ls_fill-fgcolor - iv_color_elem_name = lc_xml_node_fgcolor ). - IF ls_fill-fgcolor-rgb IS INITIAL AND - ls_fill-fgcolor-indexed EQ zcl_excel_style_color=>c_indexed_not_set AND - ls_fill-fgcolor-theme EQ zcl_excel_style_color=>c_theme_not_set AND - ls_fill-fgcolor-tint IS INITIAL AND ls_fill-bgcolor-indexed EQ zcl_excel_style_color=>c_indexed_sys_foreground. + if ls_fill-gradtype is not initial. + "gradient - " bgcolor + lo_sub_element = lo_document->create_simple_element( name = lc_xml_node_gradientfill + parent = lo_document ). + if ls_fill-gradtype-degree is not initial. + lv_value = ls_fill-gradtype-degree. + lo_sub_element->set_attribute_ns( name = lc_xml_attr_degree value = lv_value ). + endif. + if ls_fill-gradtype-type is not initial. + lv_value = ls_fill-gradtype-type. + lo_sub_element->set_attribute_ns( name = lc_xml_attr_type value = lv_value ). + endif. + if ls_fill-gradtype-bottom is not initial. + lv_value = ls_fill-gradtype-bottom. + lo_sub_element->set_attribute_ns( name = lc_xml_attr_bottom value = lv_value ). + endif. + if ls_fill-gradtype-top is not initial. + lv_value = ls_fill-gradtype-top. + lo_sub_element->set_attribute_ns( name = lc_xml_attr_top value = lv_value ). + endif. + if ls_fill-gradtype-right is not initial. + lv_value = ls_fill-gradtype-right. + lo_sub_element->set_attribute_ns( name = lc_xml_attr_right value = lv_value ). + endif. + if ls_fill-gradtype-left is not initial. + lv_value = ls_fill-gradtype-left. + lo_sub_element->set_attribute_ns( name = lc_xml_attr_left value = lv_value ). + endif. + + if ls_fill-gradtype-position3 is not initial. + "create <stop> elements for gradients, we can have 2 or 3 stops in each gradient + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_stop + parent = lo_sub_element ). + lv_value = ls_fill-gradtype-position1. + lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_position value = lv_value ). + + create_xl_styles_color_node( + io_document = lo_document + io_parent = lo_sub_element_2 + is_color = ls_fill-bgcolor + iv_color_elem_name = lc_xml_node_color ). + lo_sub_element->append_child( new_child = lo_sub_element_2 ). + + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_stop + parent = lo_sub_element ). + + lv_value = ls_fill-gradtype-position2. + + lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_position + value = lv_value ). + + create_xl_styles_color_node( + io_document = lo_document + io_parent = lo_sub_element_2 + is_color = ls_fill-fgcolor + iv_color_elem_name = lc_xml_node_color ). + lo_sub_element->append_child( new_child = lo_sub_element_2 ). + + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_stop + parent = lo_sub_element ). + + lv_value = ls_fill-gradtype-position3. + lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_position + value = lv_value ). + + create_xl_styles_color_node( + io_document = lo_document + io_parent = lo_sub_element_2 + is_color = ls_fill-bgcolor + iv_color_elem_name = lc_xml_node_color ). + lo_sub_element->append_child( new_child = lo_sub_element_2 ). + + else. + "create <stop> elements for gradients, we can have 2 or 3 stops in each gradient + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_stop + parent = lo_sub_element ). + lv_value = ls_fill-gradtype-position1. + lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_position value = lv_value ). + + create_xl_styles_color_node( + io_document = lo_document + io_parent = lo_sub_element_2 + is_color = ls_fill-bgcolor + iv_color_elem_name = lc_xml_node_color ). + lo_sub_element->append_child( new_child = lo_sub_element_2 ). + + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_stop + parent = lo_sub_element ). + + lv_value = ls_fill-gradtype-position2. + lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_position + value = lv_value ). + + create_xl_styles_color_node( + io_document = lo_document + io_parent = lo_sub_element_2 + is_color = ls_fill-fgcolor + iv_color_elem_name = lc_xml_node_color ). + lo_sub_element->append_child( new_child = lo_sub_element_2 ). + endif. + + + + + else. + "pattern + lo_sub_element = lo_document->create_simple_element( name = lc_xml_node_patternfill + parent = lo_document ). + lv_value = ls_fill-filltype. + lo_sub_element->set_attribute_ns( name = lc_xml_attr_patterntype + value = lv_value ). + " fgcolor create_xl_styles_color_node( io_document = lo_document io_parent = lo_sub_element - is_color = ls_fill-bgcolor - iv_color_elem_name = lc_xml_node_bgcolor ). + is_color = ls_fill-fgcolor + iv_color_elem_name = lc_xml_node_fgcolor ). - ENDIF. + IF ls_fill-fgcolor-rgb IS INITIAL AND + ls_fill-fgcolor-indexed EQ zcl_excel_style_color=>c_indexed_not_set AND + ls_fill-fgcolor-theme EQ zcl_excel_style_color=>c_theme_not_set AND + ls_fill-fgcolor-tint IS INITIAL AND ls_fill-bgcolor-indexed EQ zcl_excel_style_color=>c_indexed_sys_foreground. + + " bgcolor + create_xl_styles_color_node( + io_document = lo_document + io_parent = lo_sub_element + is_color = ls_fill-bgcolor + iv_color_elem_name = lc_xml_node_bgcolor ). + + ENDIF. + endif. lo_element_fill->append_child( new_child = lo_sub_element )."pattern lo_element_fills->append_child( new_child = lo_element_fill ). diff --git a/ZA2X/PROG/ZDEMO_EXCEL.slnk b/ZA2X/PROG/ZDEMO_EXCEL.slnk index 1bfc585..b779d7b 100644 --- a/ZA2X/PROG/ZDEMO_EXCEL.slnk +++ b/ZA2X/PROG/ZDEMO_EXCEL.slnk @@ -40,50 +40,50 @@ START-OF-SELECTION. cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = sy-lisel ). CONCATENATE p_path sy-lisel '01_HelloWorld.xlsx' INTO lv_upfile. - SUBMIT zdemo_excel1 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Hello world - SUBMIT zdemo_excel2 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Styles - SUBMIT zdemo_excel3 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: iTab binding - SUBMIT zdemo_excel4 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Multi sheets, page setup and sheet properties - SUBMIT zdemo_excel5 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Conditional formatting - SUBMIT zdemo_excel6 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Formulas - SUBMIT zdemo_excel7 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Conditional formatting - SUBMIT zdemo_excel8 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Ranges - SUBMIT zdemo_excel9 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Data validation - SUBMIT zdemo_excel10 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Bind table with field catalog + SUBMIT zdemo_excel1 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Hello world + SUBMIT zdemo_excel2 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Styles + SUBMIT zdemo_excel3 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: iTab binding + SUBMIT zdemo_excel4 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Multi sheets, page setup and sheet properties + SUBMIT zdemo_excel5 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Conditional formatting + SUBMIT zdemo_excel6 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Formulas + SUBMIT zdemo_excel7 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Conditional formatting + SUBMIT zdemo_excel8 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Ranges + SUBMIT zdemo_excel9 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Data validation + SUBMIT zdemo_excel10 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Bind table with field catalog " zdemo_excel11 is not added because it has a selection screen and " you also need to have business partners maintained in transaction BP - SUBMIT zdemo_excel12 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Column size - SUBMIT zdemo_excel13 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Merge cell - SUBMIT zdemo_excel14 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Alignment - SUBMIT zdemo_excel16 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Drawing - SUBMIT zdemo_excel17 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Lock sheet - SUBMIT zdemo_excel18 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Lock workbook - SUBMIT zdemo_excel19 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Set active sheet + SUBMIT zdemo_excel12 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Column size + SUBMIT zdemo_excel13 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Merge cell + SUBMIT zdemo_excel14 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Alignment + SUBMIT zdemo_excel16 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Drawing + SUBMIT zdemo_excel17 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Lock sheet + SUBMIT zdemo_excel18 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Lock workbook + SUBMIT zdemo_excel19 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Set active sheet " zdemo_excel20 is not added because it uses ALV and cannot be processed (OLE2) - SUBMIT zdemo_excel21 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Color Picker - SUBMIT zdemo_excel22 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Bind table with field catalog & sheet style - SUBMIT zdemo_excel23 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Multiple sheets with and w/o grid lines, print options - SUBMIT zdemo_excel24 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Multiple sheets with different default date formats + SUBMIT zdemo_excel21 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Color Picker + SUBMIT zdemo_excel22 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Bind table with field catalog & sheet style + SUBMIT zdemo_excel23 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Multiple sheets with and w/o grid lines, print options + SUBMIT zdemo_excel24 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Multiple sheets with different default date formats SUBMIT zdemo_excel25 AND RETURN. " abap2xlsx Demo: Create and xlsx on Application Server (could be executed in batch mode) " zdemo_excel26 is not added because it uses ALV and cannot be processed (Native) - SUBMIT zdemo_excel27 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Conditional Formatting - SUBMIT zdemo_excel28 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: CSV writer - " SUBMIT zdemo_excel29 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Macro enabled workbook - SUBMIT zdemo_excel30 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: ABAP Cell data types + leading blanks string - SUBMIT zdemo_excel31 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Autosize Column with different Font sizes + SUBMIT zdemo_excel27 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Conditional Formatting + SUBMIT zdemo_excel28 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: CSV writer + " SUBMIT zdemo_excel29 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Macro enabled workbook + SUBMIT zdemo_excel30 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: ABAP Cell data types + leading blanks string + SUBMIT zdemo_excel31 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Autosize Column with different Font sizes " zdemo_excel32 is not added because it uses ALV and cannot be processed (Native) - SUBMIT zdemo_excel33 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Table autofilter - SUBMIT zdemo_excel34 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Static Styles Chess - SUBMIT zdemo_excel35 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Static Styles - SUBMIT zdemo_excel36 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Style applied to sheet, column and single cell + SUBMIT zdemo_excel33 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Table autofilter + SUBMIT zdemo_excel34 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Static Styles Chess + SUBMIT zdemo_excel35 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Static Styles + SUBMIT zdemo_excel36 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Style applied to sheet, column and single cell SUBMIT zdemo_excel37 WITH p_upfile = lv_upfile - WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Simplest call of the reader and writer - passthrough data - SUBMIT zdemo_excel38 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Show off integration of drawings ( here using the SAP-Icons ) - SUBMIT zdemo_excel39 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Charts - SUBMIT zdemo_excel40 WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Demo Printsettings + WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Simplest call of the reader and writer - passthrough data + SUBMIT zdemo_excel38 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Show off integration of drawings ( here using the SAP-Icons ) + SUBMIT zdemo_excel39 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Charts + SUBMIT zdemo_excel40 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " abap2xlsx Demo: Demo Printsettings " " Reader/Writer Demo must always run at the end " to make sure all documents where created " - SUBMIT zdemo_excel15 WITH p_path = p_path AND RETURN. " Read Excel and write it back + SUBMIT zdemo_excel15 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. " Read Excel and write it back diff --git a/ZA2X/PROG/ZDEMO_EXCEL2.slnk b/ZA2X/PROG/ZDEMO_EXCEL2.slnk index 52b7b56..537bad7 100644 --- a/ZA2X/PROG/ZDEMO_EXCEL2.slnk +++ b/ZA2X/PROG/ZDEMO_EXCEL2.slnk @@ -1,5 +1,5 @@ - - + + @@ -32,7 +32,21 @@ DATA: lv_style_bold_guid TYPE zexcel_cell_style, lv_style_filled_green_guid TYPE zexcel_cell_style, lv_style_border_guid TYPE zexcel_cell_style, lv_style_button_guid TYPE zexcel_cell_style, - lv_style_filled_turquoise_guid TYPE zexcel_cell_style. + lv_style_filled_turquoise_guid TYPE zexcel_cell_style, + lv_style_gr_cornerlb_guid TYPE zexcel_cell_style, + lv_style_gr_cornerlt_guid TYPE zexcel_cell_style, + lv_style_gr_cornerrb_guid TYPE zexcel_cell_style, + lv_style_gr_cornerrt_guid TYPE zexcel_cell_style, + lv_style_gr_horizontal90_guid TYPE zexcel_cell_style, + lv_style_gr_horizontal270_guid TYPE zexcel_cell_style, + lv_style_gr_horizontalb_guid TYPE zexcel_cell_style, + lv_style_gr_vertical_guid TYPE zexcel_cell_style, + lv_style_gr_vertical2_guid TYPE zexcel_cell_style, + lv_style_gr_fromcenter_guid TYPE zexcel_cell_style, + lv_style_gr_diagonal45_guid TYPE zexcel_cell_style, + lv_style_gr_diagonal45b_guid TYPE zexcel_cell_style, + lv_style_gr_diagonal135_guid TYPE zexcel_cell_style, + lv_style_gr_diagonal135b_guid TYPE zexcel_cell_style . DATA: lv_file TYPE xstring, lv_bytecount TYPE i, @@ -41,6 +55,7 @@ DATA: lv_file TYPE xstring, DATA: lv_full_path TYPE string, lv_workdir TYPE string, lv_file_separator TYPE c. +DATA: lo_row_dim TYPE REF TO zcl_excel_worksheet_rowdimensi. CONSTANTS: gc_save_file_name TYPE string VALUE '02_Styles.xlsx'. INCLUDE zdemo_excel_outputopt_incl. @@ -102,6 +117,128 @@ START-OF-SELECTION. lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. lv_style_filled_green_guid = lo_style_filled->get_guid( ). + " Create filled with gradients + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_cornerlb. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_cornerlb_guid = lo_style_filled->get_guid( ). + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_cornerlt. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_cornerlt_guid = lo_style_filled->get_guid( ). + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_cornerrb. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_cornerrb_guid = lo_style_filled->get_guid( ). + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_cornerrt. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_cornerrt_guid = lo_style_filled->get_guid( ). + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_horizontal90. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_horizontal90_guid = lo_style_filled->get_guid( ). + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_horizontal270. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_horizontal270_guid = lo_style_filled->get_guid( ). + + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_horizontalb. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_horizontalb_guid = lo_style_filled->get_guid( ). + + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_vertical. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_vertical_guid = lo_style_filled->get_guid( ). + + + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_vertical. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_vertical2_guid = lo_style_filled->get_guid( ). + + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_fromcenter. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_fromcenter_guid = lo_style_filled->get_guid( ). + + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal45. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_diagonal45_guid = lo_style_filled->get_guid( ). + + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal45b. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_diagonal45b_guid = lo_style_filled->get_guid( ). + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal135. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_diagonal135_guid = lo_style_filled->get_guid( ). + + lo_style_filled = lo_excel->add_new_style( ). + lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal135b. + lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue. + lo_style_filled->fill->bgcolor-rgb = zcl_excel_style_color=>c_white. + lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria. + lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major. + lv_style_gr_diagonal135b_guid = lo_style_filled->get_guid( ). + + + " Create filled style turquoise using legacy excel ver <= 2003 palette. (https://code.sdn.sap.com/spaces/abap2xlsx/tickets/92) lo_style_filled = lo_excel->add_new_style( ). lo_excel->legacy_palette->set_color( "replace built-in color from palette with out custom RGB turquoise @@ -131,6 +268,52 @@ START-OF-SELECTION. " 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 ). + + lo_worksheet->set_cell( ip_column = 'B' ip_row = 10 ip_style = lv_style_gr_cornerlb_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_cornerlb ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 10 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'C' ip_row = 11 ip_style = lv_style_gr_cornerlt_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_cornerlt ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 11 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'B' ip_row = 12 ip_style = lv_style_gr_cornerrb_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_cornerrb ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 12 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'C' ip_row = 13 ip_style = lv_style_gr_cornerrt_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_cornerrt ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 13 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'B' ip_row = 14 ip_style = lv_style_gr_horizontal90_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_horizontal90 ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 14 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'C' ip_row = 15 ip_style = lv_style_gr_horizontal270_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_horizontal270 ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 15 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'B' ip_row = 16 ip_style = lv_style_gr_horizontalb_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_horizontalb ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 16 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'C' ip_row = 17 ip_style = lv_style_gr_vertical_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_vertical ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 17 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'B' ip_row = 18 ip_style = lv_style_gr_vertical2_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_vertical ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 18 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'C' ip_row = 19 ip_style = lv_style_gr_fromcenter_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_fromcenter ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 19 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'B' ip_row = 20 ip_style = lv_style_gr_diagonal45_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_diagonal45 ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 20 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'C' ip_row = 21 ip_style = lv_style_gr_diagonal45b_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_diagonal45b ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 21 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'B' ip_row = 22 ip_style = lv_style_gr_diagonal135_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_diagonal135 ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 22 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + lo_worksheet->set_cell( ip_column = 'C' ip_row = 23 ip_style = lv_style_gr_diagonal135b_guid ip_value = zcl_excel_style_fill=>c_fill_gradient_diagonal135b ). + lo_row_dim = lo_worksheet->get_row_dimension( ip_row = 23 ). + lo_row_dim->set_row_height( ip_row_height = 30 ). + + + * CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007. * lv_file = lo_excel_writer->write_file( lo_excel ). * diff --git a/ZA2X/PROG/ZDEMO_EXCEL34.slnk b/ZA2X/PROG/ZDEMO_EXCEL34.slnk index 84a3a6c..cea21e9 100644 --- a/ZA2X/PROG/ZDEMO_EXCEL34.slnk +++ b/ZA2X/PROG/ZDEMO_EXCEL34.slnk @@ -1,5 +1,5 @@ - - + + @@ -203,11 +203,13 @@ START-OF-SELECTION. IF colorflag = 0. lo_worksheet->change_cell_style( ip_column = col_alpha ip_row = row - ip_fill_fgcolor_rgb = 'FFB5866A' ). + ip_fill_fgcolor_rgb = 'FFB5866A' + ip_fill_filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal135 ). ELSE. lo_worksheet->change_cell_style( ip_column = col_alpha ip_row = row - ip_fill_fgcolor_rgb = 'FFF5DEBF' ). + ip_fill_fgcolor_rgb = 'FFF5DEBF' + ip_fill_filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal45 ). ENDIF. diff --git a/ZA2X/TABL/ZEXCEL_S_CSTYLEX_FILL.slnk b/ZA2X/TABL/ZEXCEL_S_CSTYLEX_FILL.slnk index 3c62a01..14a7dee 100644 --- a/ZA2X/TABL/ZEXCEL_S_CSTYLEX_FILL.slnk +++ b/ZA2X/TABL/ZEXCEL_S_CSTYLEX_FILL.slnk @@ -1,16 +1,26 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ZA2X/TABL/ZEXCEL_S_CSTYLEX_GRADTYPE.slnk b/ZA2X/TABL/ZEXCEL_S_CSTYLEX_GRADTYPE.slnk new file mode 100644 index 0000000..48fa721 --- /dev/null +++ b/ZA2X/TABL/ZEXCEL_S_CSTYLEX_GRADTYPE.slnk @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/ZA2X/TABL/ZEXCEL_S_CSTYLE_FILL.slnk b/ZA2X/TABL/ZEXCEL_S_CSTYLE_FILL.slnk index 0c2e588..b50b642 100644 --- a/ZA2X/TABL/ZEXCEL_S_CSTYLE_FILL.slnk +++ b/ZA2X/TABL/ZEXCEL_S_CSTYLE_FILL.slnk @@ -1,16 +1,26 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ZA2X/TABL/ZEXCEL_S_GRADIENT_TYPE.slnk b/ZA2X/TABL/ZEXCEL_S_GRADIENT_TYPE.slnk new file mode 100644 index 0000000..cd13359 --- /dev/null +++ b/ZA2X/TABL/ZEXCEL_S_GRADIENT_TYPE.slnk @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/ZA2X/TABL/ZEXCEL_S_STYLE_FILL.slnk b/ZA2X/TABL/ZEXCEL_S_STYLE_FILL.slnk index e1325ca..2dbef07 100644 --- a/ZA2X/TABL/ZEXCEL_S_STYLE_FILL.slnk +++ b/ZA2X/TABL/ZEXCEL_S_STYLE_FILL.slnk @@ -1,6 +1,6 @@ - - - + + + @@ -13,4 +13,14 @@ + + + + + + + + + + diff --git a/ZA2X/TABL/ZEXCEL_S_STYLE_FILL.slnk.old b/ZA2X/TABL/ZEXCEL_S_STYLE_FILL.slnk.old deleted file mode 100644 index d2993a3..0000000 --- a/ZA2X/TABL/ZEXCEL_S_STYLE_FILL.slnk.old +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - -