From 2c9d26b09568dd5ee281a63c8211bdcfc66dcb18 Mon Sep 17 00:00:00 2001 From: Ivan Femia Date: Sat, 16 Oct 2010 18:18:51 +0000 Subject: [PATCH] Excel sheet protection full options git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@28 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049 --- ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk | 288 ++++++++++++---------- ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk | 280 +++++++++++++-------- ZA2X/DOMA/ZEXCEL_SHEET_BOOL.slnk | 5 + ZA2X/INTF/ZIF_EXCEL_SHEET_PROTECTION.slnk | 26 +- ZA2X/PROG/ZDEMO_EXCEL17.slnk | 11 +- ZA2X/TABL/ZEXCEL_S_STYLE_FONT.slnk | 2 +- 6 files changed, 362 insertions(+), 250 deletions(-) create mode 100644 ZA2X/DOMA/ZEXCEL_SHEET_BOOL.slnk diff --git a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk index 91a816e..d9693d1 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk @@ -1,6 +1,6 @@ - - + + class ZCL_EXCEL_WORKSHEET definition public final @@ -191,67 +191,85 @@ private section. *"* in the implementation part of the class ABAP - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + METHOD zif_excel_sheet_protection~initialize. me->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_unprotected. CLEAR me->zif_excel_sheet_protection~password. + me->zif_excel_sheet_protection~auto_filter = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~delete_columns = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~delete_rows = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~format_cells = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~format_columns = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~format_rows = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~insert_columns = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~insert_hyperlinks = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~insert_rows = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~objects = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~password = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~pivot_tables = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~scenarios = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~select_locked_cells = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~select_unlocked_cells = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~sheet = zif_excel_sheet_protection=>c_noactive. + me->zif_excel_sheet_protection~sort = zif_excel_sheet_protection=>c_noactive. ENDMETHOD. - - + + method ADD_DRAWING. drawings->add( ip_drawing ). endmethod. - - + + method ADD_NEW_CONDITIONAL_STYLE. CREATE OBJECT eo_conditional_style. conditional_styles->add( eo_conditional_style ). endmethod. - - + + method ADD_NEW_DATA_VALIDATION. CREATE OBJECT eo_data_validation. data_validations->add( eo_data_validation ). endmethod. - - - - + + + + method BIND_TABLE. DATA: @@ -374,10 +392,10 @@ endmethod. endmethod. - - - - METHOD constructor. + + + + method CONSTRUCTOR. me->excel = ip_excel. @@ -410,9 +428,9 @@ endmethod. lower_cell-cell_column = 1. upper_cell-cell_row = 1. upper_cell-cell_column = 1. -ENDMETHOD. +endmethod. - + method DELETE_MERGE. DELETE sheet_content_merge INDEX 1. @@ -420,10 +438,10 @@ ENDMETHOD. endmethod. - - - - + + + + method FREEZE_PANES. data: lv_xsplit type i, lv_ysplit type i. @@ -450,8 +468,8 @@ endmethod. freeze_pane_cell_row = ip_num_rows + 1. endmethod. - - + + method GET_ACTIVE_CELL. DATA: lv_active_column TYPE zexcel_cell_column_alpha, @@ -465,11 +483,11 @@ endmethod. endmethod. - - - - - + + + + + method GET_CELL. DATA: lv_column TYPE zexcel_cell_column, @@ -486,9 +504,9 @@ endmethod. ep_value = ls_sheet_content-cell_value. endmethod. - - - + + + method GET_COLUMN_DIMENSION. FIELD-SYMBOLS: <fs_column_dimension> LIKE LINE OF column_dimensions. @@ -508,46 +526,46 @@ endmethod. endmethod. - - + + method GET_COLUMN_DIMENSIONS. r_column_dimension[] = me->column_dimensions[]. endmethod. - - + + method GET_COND_STYLES_ITERATOR. eo_iterator = me->conditional_styles->get_iterator( ). endmethod. - - + + method GET_DATA_VALIDATIONS_ITERATOR. eo_iterator = me->data_validations->get_iterator( ). endmethod. - - + + method GET_DATA_VALIDATIONS_SIZE. ep_size = me->data_validations->size( ). endmethod. - - + + method GET_DEFAULT_COLUMN_DIMENSION. r_column_dimension = me->default_column_dimension. endmethod. - - + + method GET_DEFAULT_ROW_DIMENSION. r_row_dimension = me->default_row_dimension. endmethod. - - + + method GET_DIMENSION_RANGE. me->update_dimension_range( ). @@ -559,50 +577,62 @@ endmethod. endmethod. - - + + method GET_DRAWINGS. r_drawings = drawings. endmethod. - - + + method GET_DRAWINGS_ITERATOR. eo_iterator = drawings->get_iterator( ). endmethod. - - - + + + method GET_FREEZE_CELL. ep_row = me->freeze_pane_cell_row. ep_column = me->freeze_pane_cell_column. endmethod. - - + + method GET_GUID. ep_guid = me->guid. endmethod. - - + + method GET_HIGHEST_COLUMN. me->update_dimension_range( ). r_highest_column = me->lower_cell-cell_column. endmethod. - - + + method GET_HIGHEST_ROW. me->update_dimension_range( ). r_highest_row = me->lower_cell-cell_row. endmethod. - - + + + method GET_HYPERLINKS_ITERATOR. + eo_iterator = hyperlinks->get_iterator( ). +endmethod. + + + + method GET_HYPERLINKS_SIZE. + ep_size = hyperlinks->size( ). +endmethod. + + + method GET_MERGE. DATA: lv_column_start TYPE string, @@ -673,9 +703,9 @@ endmethod. endmethod. - - - + + + method GET_ROW_DIMENSION. FIELD-SYMBOLS: <fs_row_dimension> LIKE LINE OF row_dimensions. @@ -695,32 +725,32 @@ endmethod. endmethod. - - + + method GET_ROW_DIMENSIONS. r_row_dimension[] = me->row_dimensions[]. endmethod. - - + + method GET_TABLES_ITERATOR. eo_iterator = tables->if_object_collection~get_iterator( ). endmethod. - - + + method GET_TABLES_SIZE. ep_size = tables->if_object_collection~size( ). endmethod. - - - - - - - - METHOD set_cell. + + + + + + + + method SET_CELL. DATA: lv_column TYPE zexcel_cell_column, ls_sheet_content TYPE zexcel_s_cell_data, @@ -812,11 +842,11 @@ endmethod. endmethod. - - - - - + + + + + method SET_CELL_STYLE. DATA: lv_column TYPE zexcel_cell_column, @@ -844,10 +874,10 @@ endmethod. endmethod. - - - - + + + + method SET_MERGE. DATA: lv_column_start TYPE zexcel_cell_column, @@ -878,13 +908,13 @@ endmethod. endmethod. - - - - - - - + + + + + + + method SET_TABLE. DATA: lo_tabdescr TYPE REF TO cl_abap_structdescr, @@ -941,7 +971,7 @@ endmethod. endmethod. - + method UPDATE_DIMENSION_RANGE. DATA: ls_sheet_content TYPE zexcel_s_cell_data, @@ -981,18 +1011,4 @@ endmethod. endmethod. - - - METHOD get_hyperlinks_iterator. - eo_iterator = hyperlinks->get_iterator( ). -ENDMETHOD. - - - - - METHOD get_hyperlinks_size. - ep_size = hyperlinks->size( ). -ENDMETHOD. - - diff --git a/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk b/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk index fa67780..69089d9 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk @@ -1582,109 +1582,122 @@ endmethod. - method CREATE_XL_SHEET. + METHOD create_xl_sheet. ** Constant node name - DATA: lc_xml_node_worksheet TYPE string VALUE 'worksheet', - lc_xml_node_sheetpr TYPE string VALUE 'sheetPr', - lc_xml_node_outlinepr TYPE string VALUE 'outlinePr', - lc_xml_node_dimension TYPE string VALUE 'dimension', - lc_xml_node_sheetviews TYPE string VALUE 'sheetViews', - lc_xml_node_sheetview TYPE string VALUE 'sheetView', - lc_xml_node_selection TYPE string VALUE 'selection', - lc_xml_node_pane TYPE string VALUE 'pane', - lc_xml_node_sheetformatpr TYPE string VALUE 'sheetFormatPr', - lc_xml_node_cols TYPE string VALUE 'cols', - lc_xml_node_col TYPE string VALUE 'col', - lc_xml_node_sheetdata TYPE string VALUE 'sheetData', - lc_xml_node_row TYPE string VALUE 'row', - lc_xml_node_c TYPE string VALUE 'c', - lc_xml_node_v TYPE string VALUE 'v', - lc_xml_node_f TYPE string VALUE 'f', - lc_xml_node_sheetprotection TYPE string VALUE 'sheetProtection', - lc_xml_node_pagemargins TYPE string VALUE 'pageMargins', - lc_xml_node_pagesetup TYPE string VALUE 'pageSetup', - lc_xml_node_pagesetuppr TYPE string VALUE 'pageSetUpPr', - lc_xml_node_condformatting TYPE string VALUE 'conditionalFormatting', - lc_xml_node_cfrule TYPE string VALUE 'cfRule', - lc_xml_node_iconset TYPE string VALUE 'iconSet', - lc_xml_node_cfvo TYPE string VALUE 'cfvo', - lc_xml_node_formula TYPE string VALUE 'formula', - lc_xml_node_datavalidations TYPE string VALUE 'dataValidations', - lc_xml_node_datavalidation TYPE string VALUE 'dataValidation', - lc_xml_node_formula1 TYPE string VALUE 'formula1', - lc_xml_node_mergecell TYPE string VALUE 'mergeCell', - lc_xml_node_mergecells TYPE string VALUE 'mergeCells', - lc_xml_node_drawing TYPE string VALUE 'drawing', + DATA: lc_xml_node_worksheet TYPE string VALUE 'worksheet', + lc_xml_node_sheetpr TYPE string VALUE 'sheetPr', + lc_xml_node_outlinepr TYPE string VALUE 'outlinePr', + lc_xml_node_dimension TYPE string VALUE 'dimension', + lc_xml_node_sheetviews TYPE string VALUE 'sheetViews', + lc_xml_node_sheetview TYPE string VALUE 'sheetView', + lc_xml_node_selection TYPE string VALUE 'selection', + lc_xml_node_pane TYPE string VALUE 'pane', + lc_xml_node_sheetformatpr TYPE string VALUE 'sheetFormatPr', + lc_xml_node_cols TYPE string VALUE 'cols', + lc_xml_node_col TYPE string VALUE 'col', + lc_xml_node_sheetdata TYPE string VALUE 'sheetData', + lc_xml_node_row TYPE string VALUE 'row', + lc_xml_node_c TYPE string VALUE 'c', + lc_xml_node_v TYPE string VALUE 'v', + lc_xml_node_f TYPE string VALUE 'f', + lc_xml_node_sheetprotection TYPE string VALUE 'sheetProtection', + lc_xml_node_pagemargins TYPE string VALUE 'pageMargins', + lc_xml_node_pagesetup TYPE string VALUE 'pageSetup', + lc_xml_node_pagesetuppr TYPE string VALUE 'pageSetUpPr', + lc_xml_node_condformatting TYPE string VALUE 'conditionalFormatting', + lc_xml_node_cfrule TYPE string VALUE 'cfRule', + lc_xml_node_iconset TYPE string VALUE 'iconSet', + lc_xml_node_cfvo TYPE string VALUE 'cfvo', + lc_xml_node_formula TYPE string VALUE 'formula', + lc_xml_node_datavalidations TYPE string VALUE 'dataValidations', + lc_xml_node_datavalidation TYPE string VALUE 'dataValidation', + lc_xml_node_formula1 TYPE string VALUE 'formula1', + lc_xml_node_mergecell TYPE string VALUE 'mergeCell', + lc_xml_node_mergecells TYPE string VALUE 'mergeCells', + lc_xml_node_drawing TYPE string VALUE 'drawing', " Node attributes - lc_xml_attr_ref TYPE string VALUE 'ref', - lc_xml_attr_summarybelow TYPE string VALUE 'summaryBelow', - lc_xml_attr_summaryright TYPE string VALUE 'summaryRight', - lc_xml_attr_tabselected TYPE string VALUE 'tabSelected', - lc_xml_attr_workbookviewid TYPE string VALUE 'workbookViewId', - lc_xml_attr_showgridlines TYPE string VALUE 'showGridLines', - lc_xml_attr_showrowcolheaders TYPE string VALUE 'showRowColHeaders', - lc_xml_attr_activecell TYPE string VALUE 'activeCell', - lc_xml_attr_sqref TYPE string VALUE 'sqref', - lc_xml_attr_min TYPE string VALUE 'min', - lc_xml_attr_max TYPE string VALUE 'max', - lc_xml_attr_hidden TYPE string VALUE 'hidden', - lc_xml_attr_width TYPE string VALUE 'width', - lc_xml_attr_defaultwidth TYPE string VALUE '9.10', - lc_xml_attr_style TYPE string VALUE 'style', - lc_xml_attr_true TYPE string VALUE 'true', - lc_xml_attr_bestfit TYPE string VALUE 'bestFit', - lc_xml_attr_customheight TYPE string VALUE 'customHeight', - lc_xml_attr_customwidth TYPE string VALUE 'customWidth', - lc_xml_attr_collapsed TYPE string VALUE 'collapsed', - lc_xml_attr_defaultrowheight TYPE string VALUE 'defaultRowHeight', - lc_xml_attr_defaultcolwidth TYPE string VALUE 'defaultColWidth', - lc_xml_attr_outlinelevelrow TYPE string VALUE 'x14ac:outlineLevelRow', - lc_xml_attr_outlinelevelcol TYPE string VALUE 'x14ac:outlineLevelCol', - lc_xml_attr_outlinelevel TYPE string VALUE 'outlineLevel', - lc_xml_attr_r TYPE string VALUE 'r', - lc_xml_attr_s TYPE string VALUE 's', - lc_xml_attr_spans TYPE string VALUE 'spans', - lc_xml_attr_t TYPE string VALUE 't', - lc_xml_attr_password TYPE string VALUE 'password', - lc_xml_attr_sheet TYPE string VALUE 'sheet', - lc_xml_attr_objects TYPE string VALUE 'objects', - lc_xml_attr_scenarios TYPE string VALUE 'scenarios', - lc_xml_attr_left TYPE string VALUE 'left', - lc_xml_attr_right TYPE string VALUE 'right', - lc_xml_attr_top TYPE string VALUE 'top', - lc_xml_attr_bottom TYPE string VALUE 'bottom', - lc_xml_attr_header TYPE string VALUE 'header', - lc_xml_attr_footer TYPE string VALUE 'footer', - lc_xml_attr_type TYPE string VALUE 'type', - lc_xml_attr_iconset TYPE string VALUE 'iconSet', - lc_xml_attr_val TYPE string VALUE 'val', - lc_xml_attr_dxfid TYPE string VALUE 'dxfId', - lc_xml_attr_priority TYPE string VALUE 'priority', - lc_xml_attr_operator TYPE string VALUE 'operator', - lc_xml_attr_allowblank TYPE string VALUE 'allowBlank', - lc_xml_attr_showinputmessage TYPE string VALUE 'showInputMessage', - lc_xml_attr_showerrormessage TYPE string VALUE 'showErrorMessage', - lc_xml_attr_count TYPE string VALUE 'count', - lc_xml_attr_blackandwhite TYPE string VALUE 'blackAndWhite', - lc_xml_attr_cellcomments TYPE string VALUE 'cellComments', - lc_xml_attr_copies TYPE string VALUE 'copies', - lc_xml_attr_draft TYPE string VALUE 'draft', - lc_xml_attr_errors TYPE string VALUE 'errors', - lc_xml_attr_firstpagenumber TYPE string VALUE 'firstPageNumber', - lc_xml_attr_fittopage TYPE string VALUE 'fitToPage', - lc_xml_attr_fittoheight TYPE string VALUE 'fitToHeight', - lc_xml_attr_fittowidth TYPE string VALUE 'fitToWidth', - lc_xml_attr_horizontaldpi TYPE string VALUE 'horizontalDpi', - lc_xml_attr_orientation TYPE string VALUE 'orientation', - lc_xml_attr_pageorder TYPE string VALUE 'pageOrder', - lc_xml_attr_paperheight TYPE string VALUE 'paperHeight', - lc_xml_attr_papersize TYPE string VALUE 'paperSize', - lc_xml_attr_paperwidth TYPE string VALUE 'paperWidth', - lc_xml_attr_scale TYPE string VALUE 'scale', - lc_xml_attr_usefirstpagenumber TYPE string VALUE 'useFirstPageNumber', - lc_xml_attr_useprinterdefaults TYPE string VALUE 'usePrinterDefaults', - lc_xml_attr_verticaldpi TYPE string VALUE 'verticalDpi', + lc_xml_attr_ref TYPE string VALUE 'ref', + lc_xml_attr_summarybelow TYPE string VALUE 'summaryBelow', + lc_xml_attr_summaryright TYPE string VALUE 'summaryRight', + lc_xml_attr_tabselected TYPE string VALUE 'tabSelected', + lc_xml_attr_workbookviewid TYPE string VALUE 'workbookViewId', + lc_xml_attr_showgridlines TYPE string VALUE 'showGridLines', + lc_xml_attr_showrowcolheaders TYPE string VALUE 'showRowColHeaders', + lc_xml_attr_activecell TYPE string VALUE 'activeCell', + lc_xml_attr_sqref TYPE string VALUE 'sqref', + lc_xml_attr_min TYPE string VALUE 'min', + lc_xml_attr_max TYPE string VALUE 'max', + lc_xml_attr_hidden TYPE string VALUE 'hidden', + lc_xml_attr_width TYPE string VALUE 'width', + lc_xml_attr_defaultwidth TYPE string VALUE '9.10', + lc_xml_attr_style TYPE string VALUE 'style', + lc_xml_attr_true TYPE string VALUE 'true', + lc_xml_attr_bestfit TYPE string VALUE 'bestFit', + lc_xml_attr_customheight TYPE string VALUE 'customHeight', + lc_xml_attr_customwidth TYPE string VALUE 'customWidth', + lc_xml_attr_collapsed TYPE string VALUE 'collapsed', + lc_xml_attr_defaultrowheight TYPE string VALUE 'defaultRowHeight', + lc_xml_attr_defaultcolwidth TYPE string VALUE 'defaultColWidth', + lc_xml_attr_outlinelevelrow TYPE string VALUE 'x14ac:outlineLevelRow', + lc_xml_attr_outlinelevelcol TYPE string VALUE 'x14ac:outlineLevelCol', + lc_xml_attr_outlinelevel TYPE string VALUE 'outlineLevel', + lc_xml_attr_r TYPE string VALUE 'r', + lc_xml_attr_s TYPE string VALUE 's', + lc_xml_attr_spans TYPE string VALUE 'spans', + lc_xml_attr_t TYPE string VALUE 't', + lc_xml_attr_password TYPE string VALUE 'password', + lc_xml_attr_sheet TYPE string VALUE 'sheet', + lc_xml_attr_objects TYPE string VALUE 'objects', + lc_xml_attr_scenarios TYPE string VALUE 'scenarios', + lc_xml_attr_autofilter TYPE string VALUE 'autoFilter', + lc_xml_attr_deletecolumns TYPE string VALUE 'deleteColumns', + lc_xml_attr_deleterows TYPE string VALUE 'deleteRows', + lc_xml_attr_formatcells TYPE string VALUE 'formatCells', + lc_xml_attr_formatcolumns TYPE string VALUE 'formatColumns', + lc_xml_attr_formatrows TYPE string VALUE 'formatRows', + lc_xml_attr_insertcolumns TYPE string VALUE 'insertColumns', + lc_xml_attr_inserthyperlinks TYPE string VALUE 'insertHyperlinks', + lc_xml_attr_insertrows TYPE string VALUE 'insertRows', + lc_xml_attr_pivottables TYPE string VALUE 'pivotTables', + lc_xml_attr_selectlockedcells TYPE string VALUE 'selectLockedCells', + lc_xml_attr_selectunlockedcell TYPE string VALUE 'selectUnlockedCells', + lc_xml_attr_sort TYPE string VALUE 'sort', + lc_xml_attr_left TYPE string VALUE 'left', + lc_xml_attr_right TYPE string VALUE 'right', + lc_xml_attr_top TYPE string VALUE 'top', + lc_xml_attr_bottom TYPE string VALUE 'bottom', + lc_xml_attr_header TYPE string VALUE 'header', + lc_xml_attr_footer TYPE string VALUE 'footer', + lc_xml_attr_type TYPE string VALUE 'type', + lc_xml_attr_iconset TYPE string VALUE 'iconSet', + lc_xml_attr_val TYPE string VALUE 'val', + lc_xml_attr_dxfid TYPE string VALUE 'dxfId', + lc_xml_attr_priority TYPE string VALUE 'priority', + lc_xml_attr_operator TYPE string VALUE 'operator', + lc_xml_attr_allowblank TYPE string VALUE 'allowBlank', + lc_xml_attr_showinputmessage TYPE string VALUE 'showInputMessage', + lc_xml_attr_showerrormessage TYPE string VALUE 'showErrorMessage', + lc_xml_attr_count TYPE string VALUE 'count', + lc_xml_attr_blackandwhite TYPE string VALUE 'blackAndWhite', + lc_xml_attr_cellcomments TYPE string VALUE 'cellComments', + lc_xml_attr_copies TYPE string VALUE 'copies', + lc_xml_attr_draft TYPE string VALUE 'draft', + lc_xml_attr_errors TYPE string VALUE 'errors', + lc_xml_attr_firstpagenumber TYPE string VALUE 'firstPageNumber', + lc_xml_attr_fittopage TYPE string VALUE 'fitToPage', + lc_xml_attr_fittoheight TYPE string VALUE 'fitToHeight', + lc_xml_attr_fittowidth TYPE string VALUE 'fitToWidth', + lc_xml_attr_horizontaldpi TYPE string VALUE 'horizontalDpi', + lc_xml_attr_orientation TYPE string VALUE 'orientation', + lc_xml_attr_pageorder TYPE string VALUE 'pageOrder', + lc_xml_attr_paperheight TYPE string VALUE 'paperHeight', + lc_xml_attr_papersize TYPE string VALUE 'paperSize', + lc_xml_attr_paperwidth TYPE string VALUE 'paperWidth', + lc_xml_attr_scale TYPE string VALUE 'scale', + lc_xml_attr_usefirstpagenumber TYPE string VALUE 'useFirstPageNumber', + lc_xml_attr_useprinterdefaults TYPE string VALUE 'usePrinterDefaults', + lc_xml_attr_verticaldpi TYPE string VALUE 'verticalDpi', " Node namespace lc_xml_node_ns TYPE string VALUE 'http://schemas.openxmlformats.org/spreadsheetml/2006/main', @@ -2297,14 +2310,71 @@ endmethod. lo_element->set_attribute_ns( name = lc_xml_attr_password value = lv_value ). ENDIF. - lv_value = c_on. + lv_value = io_worksheet->zif_excel_sheet_protection~auto_filter. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_autofilter + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~delete_columns. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_deletecolumns + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~delete_rows. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_deleterows + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~format_cells. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_formatcells + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~format_columns. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_formatcolumns + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~format_rows. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_formatrows + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~insert_columns. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_insertcolumns + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~insert_hyperlinks. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_inserthyperlinks + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~insert_rows. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_insertrows + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~objects. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_objects + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~pivot_tables. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_pivottables + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~scenarios. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_scenarios + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~select_locked_cells. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_selectlockedcells + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~select_unlocked_cells. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_selectunlockedcell + value = lv_value ). + lv_value = io_worksheet->zif_excel_sheet_protection~sheet. CONDENSE lv_value NO-GAPS. lo_element->set_attribute_ns( name = lc_xml_attr_sheet value = lv_value ). - lo_element->set_attribute_ns( name = lc_xml_attr_objects - value = lv_value ). - lo_element->set_attribute_ns( name = lc_xml_attr_scenarios + lv_value = io_worksheet->zif_excel_sheet_protection~sort. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_sort value = lv_value ). + lo_element_root->append_child( new_child = lo_element ). ENDIF. @@ -2551,7 +2621,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. +ENDMETHOD. diff --git a/ZA2X/DOMA/ZEXCEL_SHEET_BOOL.slnk b/ZA2X/DOMA/ZEXCEL_SHEET_BOOL.slnk new file mode 100644 index 0000000..f00aa09 --- /dev/null +++ b/ZA2X/DOMA/ZEXCEL_SHEET_BOOL.slnk @@ -0,0 +1,5 @@ + + + + + diff --git a/ZA2X/INTF/ZIF_EXCEL_SHEET_PROTECTION.slnk b/ZA2X/INTF/ZIF_EXCEL_SHEET_PROTECTION.slnk index 8620b16..e42e6f5 100644 --- a/ZA2X/INTF/ZIF_EXCEL_SHEET_PROTECTION.slnk +++ b/ZA2X/INTF/ZIF_EXCEL_SHEET_PROTECTION.slnk @@ -1,8 +1,26 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/ZA2X/PROG/ZDEMO_EXCEL17.slnk b/ZA2X/PROG/ZDEMO_EXCEL17.slnk index 7e7d253..1b0d545 100644 --- a/ZA2X/PROG/ZDEMO_EXCEL17.slnk +++ b/ZA2X/PROG/ZDEMO_EXCEL17.slnk @@ -1,8 +1,8 @@ - + - + *&---------------------------------------------------------------------* @@ -53,8 +53,11 @@ START-OF-SELECTION. " Get active sheet lo_worksheet = lo_excel->get_active_worksheet( ). - lo_worksheet->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_protected. - lo_worksheet->zif_excel_sheet_protection~password = 'DAA7'. "it is the encoded word "secret" + lo_worksheet->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_protected. + lo_worksheet->zif_excel_sheet_protection~password = 'DAA7'. "it is the encoded word "secret" + lo_worksheet->zif_excel_sheet_protection~sheet = zif_excel_sheet_protection=>c_active. + lo_worksheet->zif_excel_sheet_protection~objects = zif_excel_sheet_protection=>c_active. + lo_worksheet->zif_excel_sheet_protection~scenarios = zif_excel_sheet_protection=>c_active. "Center lo_style_protection = lo_excel->add_new_style( ). diff --git a/ZA2X/TABL/ZEXCEL_S_STYLE_FONT.slnk b/ZA2X/TABL/ZEXCEL_S_STYLE_FONT.slnk index 0a252ce..697d15d 100644 --- a/ZA2X/TABL/ZEXCEL_S_STYLE_FONT.slnk +++ b/ZA2X/TABL/ZEXCEL_S_STYLE_FONT.slnk @@ -1,5 +1,5 @@ - +