From 1b7cd1a2c1c35030c83c43283b3513cdf2ce632a Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:00:38 +0300 Subject: [PATCH 01/14] Update zcl_excel.clas.abap --- src/zcl_excel.clas.abap | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/zcl_excel.clas.abap b/src/zcl_excel.clas.abap index 6a1b3c0..455cc94 100644 --- a/src/zcl_excel.clas.abap +++ b/src/zcl_excel.clas.abap @@ -43,7 +43,9 @@ public section. raising ZCX_EXCEL . methods ADD_STATIC_STYLES . - methods CONSTRUCTOR . + methods CONSTRUCTOR + raising + ZCX_EXCEL. methods DELETE_WORKSHEET importing !IO_WORKSHEET type ref to ZCL_EXCEL_WORKSHEET @@ -51,10 +53,14 @@ public section. ZCX_EXCEL . methods DELETE_WORKSHEET_BY_INDEX importing - !IV_INDEX type NUMERIC . + !IV_INDEX type NUMERIC + raising + ZCX_EXCEL . methods DELETE_WORKSHEET_BY_NAME importing - !IV_TITLE type CLIKE . + !IV_TITLE type CLIKE + raising + ZCX_EXCEL . methods GET_ACTIVE_SHEET_INDEX returning value(R_ACTIVE_WORKSHEET) type ZEXCEL_ACTIVE_WORKSHEET . From 539d21bbe23476a6f35f431bb9810cdd075f5307 Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:17:01 +0300 Subject: [PATCH 02/14] Update zcl_excel_autofilter.clas.abap --- src/zcl_excel_autofilter.clas.abap | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/zcl_excel_autofilter.clas.abap b/src/zcl_excel_autofilter.clas.abap index 42554ce..8e543cb 100644 --- a/src/zcl_excel_autofilter.clas.abap +++ b/src/zcl_excel_autofilter.clas.abap @@ -36,10 +36,14 @@ public section. value(RS_AREA) type ZEXCEL_S_AUTOFILTER_AREA . methods GET_FILTER_RANGE returning - value(R_RANGE) type ZEXCEL_CELL_VALUE . + value(R_RANGE) type ZEXCEL_CELL_VALUE + raising + ZCX_EXCEL. methods GET_FILTER_REFERENCE returning - value(R_REF) type ZEXCEL_RANGE_VALUE . + value(R_REF) type ZEXCEL_RANGE_VALUE + raising + ZCX_EXCEL . methods GET_VALUES returning value(RT_FILTER) type ZEXCEL_T_AUTOFILTER_VALUES . @@ -95,7 +99,9 @@ private section. data WORKSHEET type ref to ZCL_EXCEL_WORKSHEET . data MT_FILTERS type TT_FILTERS . - methods VALIDATE_AREA . + methods VALIDATE_AREA + raising + ZCX_EXCEL . ENDCLASS. From 70d8c148aeb2688bbe8314794b79c50b6411427c Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:18:21 +0300 Subject: [PATCH 03/14] Update zcl_excel_drawing.clas.abap --- src/zcl_excel_drawing.clas.abap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zcl_excel_drawing.clas.abap b/src/zcl_excel_drawing.clas.abap index 08cde59..64d74b4 100644 --- a/src/zcl_excel_drawing.clas.abap +++ b/src/zcl_excel_drawing.clas.abap @@ -98,7 +98,9 @@ public section. !IP_FROM_ROW type ZEXCEL_CELL_ROW !IP_FROM_COL type ZEXCEL_CELL_COLUMN_ALPHA !IP_ROWOFF type INT4 optional - !IP_COLOFF type INT4 optional . + !IP_COLOFF type INT4 optional + raising + ZCX_EXCEL . methods SET_POSITION2 importing !IP_FROM type ZEXCEL_DRAWING_LOCATION From 323d91929fd25c9b5b8b9157a11523a6aa381eb8 Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:20:12 +0300 Subject: [PATCH 04/14] Update zcl_excel_legacy_palette.clas.abap --- src/zcl_excel_legacy_palette.clas.abap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zcl_excel_legacy_palette.clas.abap b/src/zcl_excel_legacy_palette.clas.abap index c3d19eb..14e6166 100644 --- a/src/zcl_excel_legacy_palette.clas.abap +++ b/src/zcl_excel_legacy_palette.clas.abap @@ -24,7 +24,9 @@ public section. methods SET_COLOR importing !IP_INDEX type I - !IP_COLOR type ZEXCEL_STYLE_COLOR_ARGB . + !IP_COLOR type ZEXCEL_STYLE_COLOR_ARGB + raising + ZCX_EXCEL . protected section. *"* protected components of class ZCL_EXCEL_LEGACY_PALETTE *"* do not include other source files here!!! From 0945411b9477baf2fb008b2f16457f40a767a43f Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:21:41 +0300 Subject: [PATCH 05/14] Update zcl_excel_reader_2007.clas.abap --- src/zcl_excel_reader_2007.clas.abap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zcl_excel_reader_2007.clas.abap b/src/zcl_excel_reader_2007.clas.abap index 92f023a..0f8c24d 100644 --- a/src/zcl_excel_reader_2007.clas.abap +++ b/src/zcl_excel_reader_2007.clas.abap @@ -270,7 +270,9 @@ private section. importing !I_FILENAME type CSEQUENCE returning - value(R_EXCEL_DATA) type XSTRING . + value(R_EXCEL_DATA) type XSTRING + raising + ZCX_EXCEL. methods READ_FROM_LOCAL_FILE importing !I_FILENAME type CSEQUENCE From 4354a8accfe05c57e39e42e99d3c898381897829 Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:28:57 +0300 Subject: [PATCH 06/14] Update zcl_excel_reader_huge_file.clas.abap --- src/zcl_excel_reader_huge_file.clas.abap | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/zcl_excel_reader_huge_file.clas.abap b/src/zcl_excel_reader_huge_file.clas.abap index c4cf541..c03b679 100644 --- a/src/zcl_excel_reader_huge_file.clas.abap +++ b/src/zcl_excel_reader_huge_file.clas.abap @@ -201,12 +201,20 @@ endmethod. method LOAD_WORKSHEET. data: lo_reader type ref to if_sxml_reader. + data: lx_not_found type ref to lcx_not_found. lo_reader = get_sxml_reader( ip_path ). - read_worksheet_data( io_reader = lo_reader - io_worksheet = io_worksheet ). + try. + read_worksheet_data( io_reader = lo_reader + io_worksheet = io_worksheet ). + + catch lcx_not_found into lx_not_found. + raise exception type zcx_excel + exporting + error = lx_not_found->error. + endtry. endmethod. From 558578fa5e5c411b054eafe1384207a1128412c4 Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:29:40 +0300 Subject: [PATCH 07/14] Update zcl_excel_reader_xlsm.clas.abap --- src/zcl_excel_reader_xlsm.clas.abap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zcl_excel_reader_xlsm.clas.abap b/src/zcl_excel_reader_xlsm.clas.abap index 816e5ee..d3f9e1f 100644 --- a/src/zcl_excel_reader_xlsm.clas.abap +++ b/src/zcl_excel_reader_xlsm.clas.abap @@ -22,7 +22,9 @@ private section. methods LOAD_VBAPROJECT importing !IP_PATH type STRING - !IP_EXCEL type ref to ZCL_EXCEL . + !IP_EXCEL type ref to ZCL_EXCEL + raising + ZCX_EXCEL . ENDCLASS. From bf3766a170b59cf495a94449f0f4c541dbc98bc7 Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:34:13 +0300 Subject: [PATCH 08/14] Update zcl_excel_style_cond.clas.abap --- src/zcl_excel_style_cond.clas.abap | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/zcl_excel_style_cond.clas.abap b/src/zcl_excel_style_cond.clas.abap index 019657f..0fbe31a 100644 --- a/src/zcl_excel_style_cond.clas.abap +++ b/src/zcl_excel_style_cond.clas.abap @@ -75,13 +75,17 @@ public section. !IP_START_ROW type ZEXCEL_CELL_ROW !IP_START_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA !IP_STOP_ROW type ZEXCEL_CELL_ROW - !IP_STOP_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA . + !IP_STOP_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA + raising + ZCX_EXCEL . methods ADD_RANGE importing !IP_START_ROW type ZEXCEL_CELL_ROW !IP_START_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA !IP_STOP_ROW type ZEXCEL_CELL_ROW - !IP_STOP_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA . + !IP_STOP_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA + raising + ZCX_EXCEL . class-methods FACTORY_COND_STYLE_ICONSET importing !IO_WORKSHEET type ref to ZCL_EXCEL_WORKSHEET From 2f5c41832cc994c61eadb17eb34837895a0897e9 Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:36:01 +0300 Subject: [PATCH 09/14] Update zcl_excel_table.clas.abap --- src/zcl_excel_table.clas.abap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zcl_excel_table.clas.abap b/src/zcl_excel_table.clas.abap index f663cd4..6a8a938 100644 --- a/src/zcl_excel_table.clas.abap +++ b/src/zcl_excel_table.clas.abap @@ -81,7 +81,9 @@ public section. !IP_COLUMN type CLIKE !IP_FUNCTION type ZEXCEL_TABLE_TOTALS_FUNCTION returning - value(EP_FORMULA) type STRING . + value(EP_FORMULA) type STRING + raising + ZCX_EXCEL . methods HAS_TOTALS returning value(EP_RESULT) type ABAP_BOOL . From 03247f23c75062ce6fc96445e4539731e3906aca Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:36:52 +0300 Subject: [PATCH 10/14] Update zcl_excel_table.clas.abap --- src/zcl_excel_table.clas.abap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zcl_excel_table.clas.abap b/src/zcl_excel_table.clas.abap index 6a8a938..2d718f6 100644 --- a/src/zcl_excel_table.clas.abap +++ b/src/zcl_excel_table.clas.abap @@ -103,7 +103,9 @@ public section. importing !IP_INCLUDE_TOTALS_ROW type ABAP_BOOL default ABAP_TRUE returning - value(OV_REFERENCE) type STRING . + value(OV_REFERENCE) type STRING + raising + ZCX_EXCEL . methods GET_BOTTOM_ROW_INTEGER returning value(EV_ROW) type I . From 284d7db7c1d074e83d0e057ba8780810d4d12e02 Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:39:01 +0300 Subject: [PATCH 11/14] Update zcl_excel_worksheet.clas.abap --- src/zcl_excel_worksheet.clas.abap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zcl_excel_worksheet.clas.abap b/src/zcl_excel_worksheet.clas.abap index 5916fb5..3f3dcdf 100644 --- a/src/zcl_excel_worksheet.clas.abap +++ b/src/zcl_excel_worksheet.clas.abap @@ -224,7 +224,9 @@ class ZCL_EXCEL_WORKSHEET definition methods DELETE_MERGE importing !IP_CELL_COLUMN type SIMPLE optional - !IP_CELL_ROW type ZEXCEL_CELL_ROW optional . + !IP_CELL_ROW type ZEXCEL_CELL_ROW optional + raising + ZCX_EXCEL . methods DELETE_ROW_OUTLINE importing !IV_ROW_FROM type I From a1867fd71e26342736959e89ab7ae00f0dd2bcaf Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 11:52:49 +0300 Subject: [PATCH 12/14] Update zcl_excel.clas.abap --- src/zcl_excel.clas.abap | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/zcl_excel.clas.abap b/src/zcl_excel.clas.abap index 455cc94..2709c5c 100644 --- a/src/zcl_excel.clas.abap +++ b/src/zcl_excel.clas.abap @@ -43,9 +43,7 @@ public section. raising ZCX_EXCEL . methods ADD_STATIC_STYLES . - methods CONSTRUCTOR - raising - ZCX_EXCEL. + methods CONSTRUCTOR. methods DELETE_WORKSHEET importing !IO_WORKSHEET type ref to ZCL_EXCEL_WORKSHEET @@ -283,8 +281,13 @@ method CONSTRUCTOR. me->zif_excel_book_protection~initialize( ). me->zif_excel_book_properties~initialize( ). - - me->add_new_worksheet( ). + + try. + me->add_new_worksheet( ). + catch zcx_excel. + assert 1 = 2. " suppress syntax check error + endtry. + me->add_new_style( ). " Standard style lo_style = me->add_new_style( ). " Standard style with fill gray125 lo_style->fill->filltype = zcl_excel_style_fill=>c_fill_pattern_gray125. From 3e51f77be382d478af758d416f92bbf814e229e6 Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 12:11:27 +0300 Subject: [PATCH 13/14] Update zcl_excel.clas.abap --- src/zcl_excel.clas.abap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zcl_excel.clas.abap b/src/zcl_excel.clas.abap index 2709c5c..903910c 100644 --- a/src/zcl_excel.clas.abap +++ b/src/zcl_excel.clas.abap @@ -284,8 +284,8 @@ method CONSTRUCTOR. try. me->add_new_worksheet( ). - catch zcx_excel. - assert 1 = 2. " suppress syntax check error + catch zcx_excel. " suppress syntax check error + assert 1 = 2. " some error processing anyway endtry. me->add_new_style( ). " Standard style From 8653c21b8965c72385981f8b0460dd75ceca1ba2 Mon Sep 17 00:00:00 2001 From: AtomKrieg Date: Sun, 16 Sep 2018 12:13:16 +0300 Subject: [PATCH 14/14] Update zcl_excel.clas.abap --- src/zcl_excel.clas.abap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zcl_excel.clas.abap b/src/zcl_excel.clas.abap index 903910c..5d0ff9b 100644 --- a/src/zcl_excel.clas.abap +++ b/src/zcl_excel.clas.abap @@ -43,7 +43,7 @@ public section. raising ZCX_EXCEL . methods ADD_STATIC_STYLES . - methods CONSTRUCTOR. + methods CONSTRUCTOR . methods DELETE_WORKSHEET importing !IO_WORKSHEET type ref to ZCL_EXCEL_WORKSHEET