Basically only the size was miscalulated. Added new method to Drawing class to convert from emu to pixel and use this on reading a drawing.
Probable still not working when using different dpi then standard - but I have to see this before I can tackle it.
When setting a style for all columns the reader only reads this style for filled columns. The style of the remaining columns is dropped.
Example: You activate border lines for all cells, but you fill only the first three columns. After reading and writing it with ABAP2XLSX, only the first three columns have border lines.
This is fixed by setting the default style here.
Class ZCL_EXCEL_READER_2007: Added new method called before creating the stream from the internal zip-represenation to allow child classes to write own data here
Class ZCL_EXCEL_WRITER_XLSM: Reverted redefinition of method "CREATE" and put the vba-relevant coding into the new method just provided in ZCL_EXCEL_READER_2007.slnk
Class ZCL_EXCEL_READER_2007: Inheritance: Added functionality to allow creation of childclasses from ZCL_EXCEL as well if needed
Interface ZIF_EXCEL_READER: Inheritance: Added the new optional parameters to allow childclassed from ZCL_EXCEL to be created when reading an excel file
Allow inheritance to support testing of modified classes w/o having to change the original or to allow customer-specific variations
Changed objects:
ZCL_EXCEL_READER_2007: Added try-catch block to allow reading excelsheets with textfields ( ignore textfields - just read the rest )
ZCL_EXCEL_READER_2007: Added support of reading hyperlinks
ZCL_EXCEL_WRITER_2007: Corrected method CREATE_XL_SHEET_RELS to not look at internal hyperlinks
ZCL_EXCEL: Allow inheritance to test changes on subobjects w/o changing original ( needed for issue 343 for class ZCL_EXCEL_WORKSHEET )
ZCL_EXCEL_WORKSHEET: Allow inheritance, Changed row-dimensions to hashtable, added tabletype for this, changed method GET_ROW_DIMENSION to use hashtable
ZCL_EXCEL_WRITER_XLSM: Allow inheritance
ZDEMO_EXCEL_OUTPUTOPT_INCL: Changed default to "Display", Allow using any writerclass that inherits from ZCL_EXCEL_WRITER_2007
ZDEMO_EXCEL37: Allow passthrough of .xlsm files as well. Allow using any reader or writerclass that inherits from the ZCL_EXCEL_READER_2007 or ZCL_EXCEL_WRITER_2007
ZDEMO_EXCEL41: Test inheritance - demo for inherited ZCL_EXCEL or ZCL_EXCEL_WORKSHEET
1. Removed interface method ZOF_EXCEL_READER~CAN_READ_FILE
As was suggested in the comments, the method ZIF_EXCEL_READER~CAN_READ_FILE is superfluous, as the exception ZCX_EXCEL in LOAD( ) / LOAD_FILE( ) already gives this information.
This is an incompatible change! But it's unlikely that this method is used by many clients, as it didn't to anything useful. Also, the demo programs don't use it.
2. Switched the zip archive reader creation from the former "on demand" creation to a one-time creation in the LOAD method. Necessary for the next point:
3. Removed private attribute EXCEL2007 (which kept the input XSTRING): After generation of the zip archive, these data are not necessary any more.
4. Factored out Stefan Schmöcker's "alternate zip" concept into a local subclass: The object "zip" refers to a local class - which is either a proxy to CL_ABAP_ZIP, or creates a zip object of dynamic type and calls its GET method of a class dynamically (the "alternate zip" case).
Depending on the answer of my question
https://github.com/ivanfemia/abap2xlsx/issues/232#issuecomment-42115340
this abstraction could be removed in a forthcoming commit as soon as it has been clarified that CL_ABAP_ZIP works as expected in all cases.
5. Further cleaning.- Removed some comments like "ToDo: Comment this" if necessary, and also some misleading comments which gave unwanted attention to a certain defect (issue 234) and the circumstances of that defect, thereby obfuscating the far more general nature of the commented code.
Extract the parts for loading the file from application server /
presentation server into two new private methods.
Not only is the code better readable (currently, the very important LOAD
call at the end of the method almost vanishes after all that file
loading code) - it also saves memory. Currently, when the LOAD message
is processed, not only the EXCEL_DATA xstring, but also BIN_TAB, the
auxiliary table of bytes which is retrieved from GUI_UPLOAD, is kept in
the memory as a redundant copy of the raw data, although during the
parse process it is not needed any more.
In the interface method ZIF_EXCEL_READER~LOAD_FILE, add an optional
import parameter I_FROM_APPLSERVER of type flag with default SY-BATCH,
and use this parameter, instead of SY-BATCH directly, for the decision
whether to load the file from application or from presentation server.
This will make the method more flexible, decoupling the decision "Where
to read the file from" from the circumstance "Am I in batch mode". By
making the parameter optional and using the default value SY-BATCH, all
existing client code will work as before.
In methid ZIF_EXCEL_READER~LOAD_FILE, change the import parameter
I_FILENAME from type STRING to the generic type CSEQUENCE, and move it
to a string internally where needed.
This saves the client from having to move a CHAR field to an auxiliary
STRING field, only for not having a "type conflict" when calling the
method.
Enhanced Demoreport 6 to demonstrate how this new method can be used in other circumstances then reading in an EXCEL-sheet
set to test #268: Changed unit-test to make use of the extended functionality in ZCX_EXCEL
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@428 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
set ready to test #234 : Various problems with files created by LibreOffice
set ready to test #186 : Seems to be integrated for some time already
set ready to test #194 : Reading state Hidden, Outlinelevel, Collapsed of rows and columns
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@364 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
Move to protected in order to align to WRITER and allows specific readers.
BTW it is not needed a new class in this case because reader 2007 should work either with Excel 2010.
Maybe it is useful an enhancement to current reader.
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@271 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049