c0dbb07201
fpspreadsheet: Implementing reading of xlsx theme colors which are found in many xlsx files. Not quite correct yet.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3440 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-06 15:49:04 +00:00
b824d4854b
fpspreadsheet: Implement text alignment, text rotation and word wrap for xlsx reader. Extend these unit tests for xlsx - passed. Some improvements in formattests (better readability of enum data, trying to guarantee deletion of temp file in case of a mismatch).
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3407 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-02 19:21:23 +00:00
f989031cf9
fpspreadsheet: Fix font color issues of xlsx reader. No fails in unit test any more.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3396 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-29 21:02:14 +00:00
3ef1b5b331
fpspreadsheet: Fix ods writing incorrect nfTimeInterval format.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3386 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-27 17:31:02 +00:00
e2391c142b
fpsreadsheet: Introduce "virtual writing mode" where the writer does not get its data from the spreadsheet, but from an event ("OnNeedCellData"). Introduce stream switching for xlsxooxml. Both feature allow to write HUGE spreadsheet files. Add example "test_virtualmode".
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3306 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-10 20:43:46 +00:00
ddd6902edf
fpspreadsheet: Significantly improve speed of the ooxml writer, by rvk (see discussion in http://forum.lazarus.freepascal.org/index.php/topic,25110.0.html )
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3305 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-10 15:55:40 +00:00
4967d9a233
fpspreadsheet: Calculate the formula SUMIF.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3281 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 20:41:07 +00:00
fb2b3159ea
fpspreadsheet:
...
- test for bug 26447: fpspreadsheet columns >26 wrong with ooxml (patch) as fixed in r3273
- fix typo in documentation rfRow=>rfRelRow
- cosmetic changes
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3276 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 08:48:12 +00:00
2f338a50a8
fpspreadsheet: Beginning to add cells to calculation of rpn formulas.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3267 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-02 15:14:58 +00:00
c82e915262
fpspreadsheet: Fix remaining utf8 issues when reading/writing rpn string formulas. Fix BIFFExplorer issues when displaying biff2 formulas. Excel complains about data loss when reading a biff2 file containing a calculated formula having a string result - not fixed yet.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3266 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-02 11:51:59 +00:00
734c816bd1
fpspreadsheet: (Almost) complete calculation of built-in rpn string function of fpspreadsheet (PROPER and SUBSTITUTE missing)
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3257 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-30 22:30:23 +00:00
92ed17a049
* fpspreadsheet: documentation fixes
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3235 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-24 16:10:01 +00:00
517bdca8fb
fpspreadsheet: Include unit fpsutils in doc-o-matic project. Update fpspreadsheet.chm help file.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3228 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-23 21:49:20 +00:00
13a9fb2603
fpspreadsheet: Remove built-in number formats nfSci (not suppored by ods and fpc) and nfAccounting/nfAccountingRed (too much display-oriented, too cumbersome to implement for reading and displaying in the grid). If needed in Excel they can still be written using nfCustom. Update all files and tests for these now no longer existing formats.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3222 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-23 09:15:56 +00:00
d0927d2d03
fpspreadsheet: Further reduction of hints and warnings
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3206 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-20 15:58:22 +00:00
a85adcb61a
fpspreadsheet: Reducing hints and warnings, still a lot...
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3203 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-19 19:25:40 +00:00
888f605851
fpspreadsheet: Fix some date/time format display issues for ods.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3202 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-19 17:56:29 +00:00
9faf94ee3a
fpspreadsheet: Add writing of date/time formats to ods files and fix writing of time values
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3199 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-18 21:54:29 +00:00
0875ce96e8
fpspreadsheet: Reading/writing of negative currencies in red now working for ods
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3189 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-17 21:56:49 +00:00
f4f860abc2
fpspreadsheet: Cleaning up
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3167 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-13 20:32:58 +00:00
9f69ce203a
fpspreadsheet: Fix ods number format issues introduced with new number format parser. No regressions in test suite any more.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3166 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-13 20:11:41 +00:00
0abb220530
fpspreadsheet: Fix changing of decimal places for currency format in fpsgrid demo.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3162 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-13 10:03:29 +00:00
a4ee00f870
fpspreadsheet: Major reconstruction of numberformat parser to facilitate creation of xml formats for ods. Some minor regressions in unit tests and fpsgrid demo to be fixed. Removed elements "Decimals" and "CurrencySymbol" from TCell (this information is taken from the format string now). Removed the built-in format nfFmtDateTime (makes life easier, use nfCustom instead).
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-12 22:20:45 +00:00
d7ee2a84d8
fpspreadsheet: Fix crash of unit test application in case of missing length unit in HTMLLengthStrToPts. Rearrange code for ods font reading.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3147 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-06 09:17:52 +00:00
036383d658
fpspreadsheet: Add support for reading fonts from ods files.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3146 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-06 08:48:22 +00:00
6c0efaf6eb
fpspreadsheet: Improvments of TsWorksheetGrid and fpsgrid demo: Fix currency symbol not shown when selecting currency format. Fix showing a zero value when assigning a number format to an empty cell. Fix formula display when selecting an empty cell. Reset number format when selecting "General" format. Move selection to entered cell address in address edit.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3144 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-05 21:57:23 +00:00
73dc71627b
fpspreadsheet: Add code for detection of date/time cells which are incorrectly written as float by Open/LibreOffice. Implement conditional number formats for all number types (sometimes falsely assigned). Reactivate ignored date test cases for ods-1899, pass. 1904 date mode still faulty, not clear if this will ever pass the test.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3133 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-03 22:04:11 +00:00
33a8fdcb43
fpspreadsheet: Row height and column width reading/writing code for ods files complete. Test cases ok, but extremely slow speed of test application for numbertest and datetimetests. Changed units of row heights in worksheet: used to be points, is "lines" now (more consistent user interface - column width is in "standard characters", I prefer these units over centimeters because row heights/column widths become independent of screen pixels per inch this way)
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3118 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-31 21:04:53 +00:00
99f6a6f1d1
fpspreadsheet: Add unit tests for writing/reading of borders, borderstyle and wordwrap for ods files. Passed.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3109 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-27 22:12:48 +00:00
632b9d6200
fpspreadsheet: Add ods reading support for cell borders, border line styles and border colors. Borders of ods files are displayed in fpsgrid correctly.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3106 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-27 13:09:23 +00:00
89f2f4bb57
fpspreadsheet: Extend formula reading test case to biff5 and biff2 and generalize it such that the test results are not affected by locale settings and rounding errors.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3096 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-25 16:49:45 +00:00
f8e63e1f93
fpspreadsheet: Rewrite "ParseCellString" to allow for multiletter column addresses.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3091 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-24 19:44:40 +00:00
4271ace593
fpspreadsheet: Construct Excel-like formula string out of an RPN formula and display it in fpsgrid demo.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3085 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-23 23:13:49 +00:00
239633cb51
fpspreadsheet: Rename number format codes "nfCurrencyDash"/"nfCurrencyDashRed" to "nfAccounting"/"nfAccountingRed" and implement alignment of currency symbols as in Excel. Fix number format parser bug causing a failure in the corresponding test case.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3080 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-22 21:54:24 +00:00
ee1db37c7f
fpspreadsheet: In the unit tests, use the same methods for creating "soll" date/times and test format strings. --> No more biff-related regressions.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3078 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-22 12:34:10 +00:00
52faebc69e
fpspreadsheet: Improvements in biff5/8 reading of number formats, a few date/time relatived issues left. biff2 not yet touched.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3073 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-21 16:23:38 +00:00
a9df011859
fpspreadsheet: More logical writing strategy for biff number formats. Still issues with reading.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3072 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-21 12:12:16 +00:00
00ed56d1ef
fpspreadsheet: Integrate number format parser into fpspreadsheet. Some regressions in format detection...
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3068 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-20 16:13:48 +00:00
cb9d07d0dd
fpspreadsheet: Initial implementation of a number format parser. Not complete yet.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3061 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-19 22:26:42 +00:00
f638eb928a
fpspreadsheet: Write currency format codes for BIFF5 and BIFF8 (incl. "red" for negatives and "-" for zero).
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3053 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-17 15:13:08 +00:00
e21231de03
fpspreadsheet: Add controls to change number format to the fpsgrid demo program. Also, add the "brush" button to copy a format to another cell.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3049 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-15 22:41:14 +00:00
dae7caff9c
fpspreadsheet: Improved format detection when reading biff files. Unit test without errors due to biff now again. Fix compilation error of other formats due to new NumFormatList.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3048 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-15 12:53:56 +00:00
c36a5e80ce
fpspreadsheet: Building a number format list which allows to drop most of the restrictions of the previous versions like number of decimal places. New number format "nfCustom" which passes the format string directly to the file.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3044 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-14 15:24:02 +00:00
f69a47c902
fpspreadsheet: Add/complete color support for biff2 and biff8, reading and writing. Display colors in fpspreadsheetgrid.
...
Remove parameter AData in several methods of the readers/writers and replace it by FWorkbook passed at creation.
Add unit tests for font and color support. No issues.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2960 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-23 22:29:32 +00:00
8c90f30c66
fpspreadsheet: Add reading of row heights for biff8.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2952 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-20 14:57:23 +00:00
d617abccca
fpspreadsheet: Major re-write of fpspreadsheetgrid:
...
- persistent storage of workbook
- inherits from TCustomDrawGrid instead of from TCustomStringGrid
- use FixedRow/Col for row/column headers
- displays cell borders as read from the file
- uses column widths as read from the file (approximate only)
- numbers are right-aligned by default.
- demo extended to display worksheets in tabs
- some visual improvements of demo
- saving not yet working in demo
More to follow...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2951 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-19 19:29:13 +00:00
27498ff548
+ Add support for more/easier RPN formulas in XLS
...
- Allow relative cell references in RPN formulas
- Simplify generation of RPN formulas by using nested function calls
- Add writing of cell ranges for formulas in BIFF2/BIFF5
- Simplification of code e.g. by replacing the huge case instruction in TsSpreadBiffWriter.FormulaElementKindToExcelTokenID by a look-up table.
Fixes mantis issue #25718 ; patch by wp; thanks a lot!
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2931 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-08 09:48:30 +00:00
018f05324b
+ Initial write date/time cell support for opendocument/OpenOffice/Libreoffice
...
To do: adjust test suite for .ods files
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2867 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-12-23 13:35:36 +00:00
6a4ff4c1c2
* Correction to r2863: use ISO 8601 format for WriteDateTime text output (currently every format except BIFF8 xls).
...
Ensures resulting files are interoperable regardless of OS locale settings, conforming to date/time cell support in BIFF8.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2865 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-12-23 12:11:20 +00:00
a267e89ae8
FPSpreadsheet: Patch from bug 19422: Copy file OSD with
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1657 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-05-29 17:42:56 +00:00