Commit Graph

111 Commits

Author SHA1 Message Date
Łukasz Pęgiel
fb1ae88d92 THEMES + 2016-03-31 20:13:25 +02:00
Stefan Schnell
94ac8cfbd2 Update ZCL_EXCEL_WORKSHEET.slnk
Code correction for HANA functional correctness.
2015-12-09 14:49:10 +01:00
Stefan Schmöcker
524c8f5e12 Add formula as export parameter to ZCL_EXCEL_WORKSHEET->GET_CELL
Autofilters got lost at last attempt to modularize the very long method ZCL_EXCEL_WRITER_2007->CREATE_XL_SHEET
2015-10-23 08:52:33 +02:00
Łukasz Pęgiel
9d7a701585 WORKSHEET, TABLE, STYLE_NUMBER_FORMAT
ZCL_EXCEL_WORKSHEET:
- in method BIND_ALV optional parameter I_TABLE added so we can decide
if we want to have formated table in Excel or not
- in method BIND_TABLE optional parameter IV_DEFAULT_DESCR added to be
able to control which description you want to use as a table header.
ZCL_EXCEL_STYLE_NUMBER_FORMAT :
- GBP and PLN currency formats added
ZCL_EXCEL_TABLE:
- few built in table styles added
2015-08-28 18:24:51 +02:00
Stefan Schmöcker
7e01295fc3 Various issues concerning Autofilters, conditional styles, pane-freezing, Huge-Writer typo in XLST-Transformation 2015-08-03 15:31:11 +02:00
Alessandro Iannacci
9ef116622a issue #386 - Method BIND_TABLE - Unable to have columns with same name (method adds an index to the column)
Method BIND_TABLE - Unable to have columns with same name (method adds
an index to the column)
2015-06-25 15:03:39 +02:00
Alessandro Iannacci
b9581c0113 Specify abap type in bind table method
- Added new field in the field catalog (ABAP_TYPE)
- Added the abap type management in the BIND_TABLE method
2015-06-17 14:12:53 +02:00
StefanSchmoecker
af00a56683 Issue #379 - obsolete function modules
Added new class/method to wrap obsolete function GUID_CREATE and use replacement class SAP provides.  Old function call still found in wrapper class commented out for use in older releases, which don't have the new methods from SAP yet ( 7.01 does not have it for example )
Replaced calls to function by calls to wrapper-method
Changed calculation of last date in month in ZDEMO_CALENDAR since it was calling an obsoleted function as well.
2015-06-16 16:03:05 +02:00
StefanSchmoecker
0f83a0a758 Issue #377 - support pagebreaks 2015-06-01 14:23:50 +02:00
Hannes Rempel
53aae02a08 compatibility with NW 7.2 2015-04-17 17:25:33 +02:00
StefanSchmoecker
ef19367c68 Further correction to make Demoreport 37 work as before ( changed behaviour is optional merging to-parameters for row or column are omitted to allow intuitive merging like "Row 4, Columns C-F" 2015-03-12 23:44:15 +01:00
StefanSchmoecker
6958ff2b05 Minor corrections to cellmerging:
ZCL_EXCEL_WORKSHEET->DELETE_MERGE:  Parameters made optional
ZCL_EXCEL_WORKSHEET->SET_MERGE:     ColumnParameters set to "simple" and added Defaultvalues
2015-03-12 23:23:34 +01:00
Ivan
24515b3a0a fix issue #361 #363 #357 by Stefan Schmöcker""
I commit the changes due to an inconsistency in Stefan's repository
2015-03-02 09:46:24 -06:00
Ivan
24c5fca308 Update slinkees
Update of all the slinkees files with the latest version of SAPLink to
simplify merge of pull request
2015-01-12 14:55:28 -06:00
Ivan
fde89c9625 Several Fixes and Include Pull Request #350
Added the pull request #350 "Gradient Fill -> writer + demo programs 2 &
34" manually
Fixed ZEXCEL_DEMO report, bug after fix #345
Excel common has a bug, right now I used a quick and really dirty
solution
2015-01-09 18:07:01 -06:00
StefanSchmoecker
72a336253d issue #346 2nd part, #278
Changes:
ZCL_EXCEL_WORKSHEET:  New attributes to hold row-outline information
ZCL_EXCEL_WORKSHEET_ROWDIMENSI:  Look at those row-outline information.  Modified methods that refer to outlining
ZCL_EXCEL_WRITER_2007:  Respect new outlining informatino by using the modified methods from rowdimensi,  Also corrected an error that occurs if we have leading or trailing empty rows but information stored in rowdimensions
ZDEMO_EXCEL12:  Modified Demoreport 12 to demonstrate new outlining method
2015-01-03 14:50:25 +01:00
StefanSchmoecker
e5c352c6d5 Fixes for issues: 339,340,343
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
2014-12-29 17:20:09 +01:00
Ivan
01739b8676 Merge pull request #333 from oliver-huetkoeper/master
Ignore merged cells when calculating column width
2014-12-26 12:26:35 -06:00
Ivan
2838c93a1a Fix issue #336
Now column buffer uses always lowercase strings
2014-12-26 11:45:28 -06:00
oliver-huetkoeper
21a63fd96e Ignore merged cells when calculating column width
When calculating column width cells that are merged should be ignored. This is MS Excel behavior and should be handled similar in ABAP2XLSX.
2014-10-02 08:10:42 +02:00
oliver-huetkoeper
c31528604e Add method to check if a cell is merged 2014-10-02 08:05:55 +02:00
Gregor Wolf
ae56d3749b Fix issue #332 strlen used directly in expression should not be used to keep support for AS ABAP < 7.02
Additional fix for #331
2014-09-13 18:35:28 +02:00
Gregor Wolf
8e8dd7145d Fix issue #331 - replace pragma ##NO_HANDLER with "#EC NO_HANDLER 2014-09-11 19:45:48 +02:00
Ivan
c2419f3896 Code Inspector improvements
Change coding issues raised by code inspector.
Still some remain to fix.
2014-03-18 10:34:13 -05:00
chrassig
55ac5af43b More sophisticated calculation of cell widths
Let me start by saying we really love the ABAP2XLSX project. Compared to exporting CSV files and importing them to Excel, it makes transferring data from SAP systems to Excel and vice versa so much easier.

What we did not like so far was the optimization of column width, especially because of the way this is realized in the XLSX file format (why did they not just add an attribute "optimize column width = true"?). Anyway, ABAP2XLSX being an open source project, we decided to try to bring some progress to this feature.

We ended up rewriting the method CALCULATE_CELL_WIDTH of the class ZCL_EXCEL_WORKSHEET.

We added the following features:
a) Before, the calculation of the cell width in ABAP2XLSX did not take into account the fact that Excel uses a proportional font by default. Thus, columns with many "i"s ended up too wide, while columns containing many "W"s ended up not wide enough.

We now use the function module LOAD_FONT, contained in SAP package BC. Thus, it should be available in pretty much every SAP system that runs ABAP. LOAD_FONT returns an internal table containing the width of every letter known in a font. You can upload Excel's default font Calibri using transaction SM73. Make sure to upload all four files (standard, bold, italic, bold and italic) and to use the description "Calibri", i.e. exactly the name Excel displays for the font. If you want to use other fonts in your files created by ABAP2XLSX, you can of course upload other fonts as well.

We calculate the sum of the widths of all characters in a cell, and add some cell padding, similar to the way Excel does it. If the font is not available in your SAP system, we revert back to a logic similar to the old one.

As calling LOAD_FONT for every cell took several seconds when we tested with larger tables, we store the values read from the function in a hash table. Thus, we only have to call the function once for every combination of font name and font attributes used in your Excel file.

b) XLSX stores dates in a cryptic format. For dates, the current implementation calculates the width of the cryptic values, thus, the columns end up too narrow.

Fortunately, ABAP2XLSX already contains a method to transform the cryptic value into an ABAP date. We then use ABAP's WRITE statement to create a date in the format the user is preferring, and calculate the width of this formatted date.

c) ABAP2XLSX currently does not consider auto filters. Thus, a column may end up too narrow, not showing the complete header text.

We fixed this by adding a fixed value to the cell width if an auto filter is activated. We use a fixed value because the size of the auto filter button in Excel does not depend on the font size you use.

d) ABAP2XLSX only estimates the width of the characters. Excel adds a small fixed amount to the width of the characters to create some horizontal cell padding. We added cell padding as well, as this brought the cell width even closer to the values calculated by Excel.

e) ABAP2XLSX already uses ABAP's data type FLOAT to store the width of a cell. However, CALCULATE_CELL_WIDTH used data type I (integer) to calculate the cell width before. Changing the parameter type for the parameter EP_WIDTH from I to FLOAT, and adjusting the variable used by the calling method CALCULATE_COLUMN_WIDTHS in the same way, made the calculation even more precise.
2014-03-14 16:15:09 +01:00
Ivan
111cf14f2d Fix issue #297 2014-03-05 14:00:00 -06:00
Ivan Femia
427ca5c4d8 Fixed #291
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@433 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2013-09-16 23:17:04 +00:00
Ivan Femia
5c6995fe90 Test #290
It is possible to specify a formula in the field catalog instead of a value (BIND_TABLE)

git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@432 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2013-09-11 22:07:48 +00:00
Stefan Schmöcker
efedac0571 #284: Added support of reading XLSX-Files where the formulae are not stated explicitly but by reference to another cell holding a reference formula. Thanks to David for supplying the method to shift a formula to another cell.
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
2013-08-11 10:43:02 +00:00
Ivan Femia
e6ce67fc32 Fix an error with not characters values in set_cell method (issue #162)
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@417 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2013-04-09 08:01:05 +00:00
Ivan Femia
9528905a07 ready to test #162 Adding Stefan suggestion and adapting DEMO14
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@415 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2013-04-07 11:38:55 +00:00
Ivan Femia
7d5635ec6d Ready to test #259 Fix in classes ZCL_EXCEL_AUTOFILTERS, ZCL_EXCEL_AUTOFILTER, ZCL_EXCEL_WORKSHEET, ZCL_EXCEL_WRITER_2007 and ZCL_EXCEL_CONVERTER
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@413 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2013-04-07 10:06:59 +00:00
Stefan Schmöcker
70e0659f82 ZCL_EXCEL_WORKSHEET=>SET_TITLE
#243 : ' not allowed as first character in title of worksheet
#230 : pimp my code

also readded implementing code of interface printsettings since it seems to have been eradicated when removing the aliases

git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@399 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-12-08 13:11:29 +00:00
Alessandro Iannacci
8612883c9a Issue #240 - Aliases (added with commit #378) removed
+
daily build including all fixes

git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@394 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-12-06 10:37:18 +00:00
Alessandro Iannacci
5c9dde9b26 Corrupted slinkee corrected
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@392 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-12-06 09:51:45 +00:00
Alessandro Iannacci
408a280c2a #386 file corrupted --> re-added
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@388 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-12-05 12:06:33 +00:00
Alessandro Iannacci
8fb4ca103e git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@387 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049 2012-12-05 12:05:41 +00:00
Alessandro Iannacci
186cd05881 changeset #378 --> re-added, sorry
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@386 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-12-05 11:53:02 +00:00
Alessandro Iannacci
9ec17f9a2a #236: feature completed
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@385 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-12-05 11:46:37 +00:00
Stefan Schmöcker
e7865e58cb set to test #235 - Print - Titles: Repeatable Rows and Columns
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@378 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-12-02 14:15:32 +00:00
Stefan Schmöcker
14699b93ab leave at test #227 because of minor cosmetic changes
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@376 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-12-01 21:07:48 +00:00
Alessandro Iannacci
1b0a69d2b3 #227
Bind Table: Overlapping tables should raise exception - FIXED

git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@375 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-12-01 18:08:28 +00:00
Alessandro Iannacci
8c45483af8 git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@370 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049 2012-11-29 09:00:09 +00:00
Ivan Femia
fda6f0e3eb Ready to test #163
Added range capability to worksheet

git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@358 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-11-04 22:22:46 +00:00
Stefan Schmöcker
5d1bfcc2d8 Issue #225 - Correction BIND_ALV_OLE2
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@349 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-10-28 23:25:22 +00:00
Stefan Schmöcker
83269343a6 fix #226 - change of sheet title invalidates named ranges referring to this sheet
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@348 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-10-28 20:43:03 +00:00
Stefan Schmöcker
6e902d884b #179 - Add coloring of worksheet tabs ready for testing. Reader & Writer updated
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@345 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-10-23 22:23:45 +00:00
Rene Turnheim
a200b573e7 Fixed #202 issue. Added hex type to string conversion case for excel. As hex data type is not supported by Excel.
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@334 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-08-29 01:15:10 +00:00
Ivan Femia
485a7e8655 Ready to test #204 #187 #188
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@328 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-08-26 16:28:49 +00:00
Rene Turnheim
4ab796ff90 Issue #177 resolved.
Also cleaned missing exception class zcx_excel for some methods.
This change closes #177. 

git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@325 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
2012-08-10 16:21:31 +00:00