Fix#715. Replaced with CL_ABAP_UNIT_ASSERT. Class ZCL_EXCEL_AUNIT deleted.
Co-authored-by: sandra <sandra.rossi@gmail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
I could find only one use of the OS_BOOLEAN DTEL in all of abap2xlsx, precisely in zdemo_excel_outputopt_incl where it is used for the return value of a standard class method, cl_send_request->send.
"send" calls "release" which calls "submit" which finally sets e_sent_to_all to X unless one recipient has issues, in which case it is cleared: for this reason, replacing "IS INITIAL" with "= abap_false" is incorrect and the test should be inverted.
Fix of bug #756
Vietnamese/Emoji should now be rendered in systems before ABAP 7.52
Co-authored-by: sandraros <sandra.rossi@gmail.com>
Co-authored-by: Gregor Wolf <gregor.wolf@gmail.com>
* First solution, but wrong
Excel saves table1.xml with _x000d__x000a_ but abap2xlsx doing the same thing makes Excel say it's wrong!? To be analyzed...
* non-final solution
* Fix newline now accepted in table header
Fix of #474, \r\n can now be used in field catalog of table header in bind_table to display text on several lines. ZDEMO_EXCEL22 demonstrates it in first column "Flight Number" on 2 lines.
Co-authored-by: sandraros <sandra.rossi@gmail.com>
Co-authored-by: Gregor Wolf <gregor.wolf@gmail.com>
These lines are added to method SET_CELL of ZCL_EXCEL_WORKSHEET:
IF lv_value CS '_x'.
" Issue #761 value "_x0041_" rendered as "A".
" "_x...._", where "." is 0-9 a-f or A-F (case insensitive), is an internal value in sharedStrings.xml
" that Excel uses to store special characters, it's interpreted like Unicode character U+....
" for instance "_x0041_" is U+0041 which is "A".
" To not interpret such text, the first underscore is replaced with "_x005f_".
" The value "_x0041_" is to be stored internally "_x005f_x0041_" so that it's rendered like "_x0041_".
" Note that REGEX is time consuming, it's why "CS" is used above to improve the performance.
REPLACE ALL OCCURRENCES OF REGEX '_(x[0-9a-fA-F]{4}_)' IN lv_value WITH '_x005f_$1' RESPECTING CASE.
ENDIF.
Co-authored-by: sandraros <sandra.rossi@gmail.com>
* Fix output of "non-XML" characters 672 and 688
Fix#672 ("vietnamese") and #688 ("emoji").
It works for a recent system but unfortunately I can't test it on a old system to make sure that the new method `is_support_non_xml_characters` returns false.
* Remove useless code and rename variables
* Demo "Hello World" in 10 major languages + Emoji
Co-authored-by: sandraros <sandra.rossi@gmail.com>
Co-authored-by: Gregor Wolf <gregor.wolf@gmail.com>
* Fix#739 AUnit warning ZCL_EXCEL_READER_HUGE_FILE
Useless warning in ABAP Unit tests of ZCL_EXCEL_READER_HUGE_FILE (reason: extra space "# AU -> "#AU) #739
* remove #AU everywhere in abap2xlsx
Co-authored-by: Jane Doe <Jane.Doe@World.com>
Co-authored-by: sandraros <sandra.rossi@gmail.com>
* remove ZEXCEL_SHEET_PROTECTION_BOOL
this dtel uses doma ZEXCEL_BOOLE01
* remove ZEXCEL_CONDITIONAL_SHOW_VALUE
this dtel uses doma ZEXCEL_BOOLE01
* ZEXCEL_BOOLE01
it was used by:
dtel ZEXCEL_SHEET_PROTECTION_BOOL
dtel ZEXCEL_CONDITIONAL_SHOW_VALUE
* fixed spurious edit of .abapgit.xml
* Possibility to get the fieldcatalog with mandt
In some cases i need the mandt in the table.
Normally it is hidden but can be displayed if necessary
* adjusted code style
* Feature: Enable custom converters
Added method get_supported_class to ZIF_EXCEL_CONVERTER.
Implement your own converter by implementing this interface
and tell via the new interface method which class you support.
All instanceable implementations of the interface will be found
automatically.
* Fix abapLint issues
A cell contained text in the original template. It was lated deleted. But apparently a link to SharedStrings from the cell was not removed. An exception occurred after downloading and opening the file via ZCL_EXCELL_READER_2007 class. All operations until ZCL_EXCEL_READER_2007 were done using other tools.
* ATC check cleared
removed SELECT * from USR01
removed empty SELECT...ENDSELECT on URS01
* Removed Inerface method implementation
ZIF_EXCEL_READER~CAN_READ_FILE was implemented but this method is not defined anymore in the Interface.
ATC check failed with incorrect syntax.
Solution: Method implementation deleted.
according to the SAP note 1750204 we can use the method IF_IXML_OSTREAM->SKIP_NON_XML_CHARACTERS to strip out illegal characters for XML rendering.
Since this method needs a kernel version with builtin support, I've made the call dynamically in a try/catch block to support systems with a lower kernel too.
This patch fixes the issues from #298 (at least for us)
* Update zcl_excel_worksheet.clas.abap
Allow int8 type columns
* Option to create empty file
Allow to create empty excel file even if input table is empty
* Update zcl_excel_worksheet.clas.abap
Add the option to create the file or not if the input table is empty
* Test report zdemo_excel43
When using CSV mainly, if the input table is empty, the csv file contained a line with empty fields and separators.
This fooled some automation process thinking there's data to process in the file.
When optional input parameter "iv_no_line_if_empty" of method "zcl_excel_worksheet->bind_table" is checked, there's no more empty line in this case.
* User demo report 44 instead of 43
Mistake in test program name
* Fix internal renaming of test report 44
* Correct filename and test both cases
* Include test 44
When reading xlsx and autofilters are being applied a dump occured when autofilter range was defined like "Sheet1!#REF1"
Such ranges are now ignored so that the xlsx can be read.
create_xl_sheet_rels has a required parameter iv_comment_index. This was not populated in this version. When transporting the transport goes in error because he can't activate this class. adding lv_comment_index like it is in zcl_excel_writer_2007 corrects this problem.
Added "in inches" to MARGIN_XXXXXX fields, as an inch is the specified unit of measurement for margins in OpenXML standard (so it cannot be different).
* Read UTF-8 input file correctly
* Classes for cell coments
As contributed by guillaumegarcia13
* Support for comments (Issue #180)
As contributed by guillaumegarcia13
Issue #572 - Protect sheet with filter caused Excel error
Autofilter + sheet protection causes excel error.
Sheet protection must be set BEFORE autofilter in XML.