Commit Graph

28 Commits

Author SHA1 Message Date
wp_xxyyzz
24153116a4 fpspreadsheet: Fix reading/writing of milliseconds. Add corresponding test cases. (NOTE: ods cannot display tenths of a second).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6228 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-03-07 22:35:19 +00:00
wp_xxyyzz
47db427771 fpspreadsheet: Add header/footer parser for conversion between Excel and ODS header/footer. Still some bugs.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4121 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-09 22:40:59 +00:00
wp_xxyyzz
03b7dedde7 fpspreadsheet: Improved number format parser
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4082 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-04-18 14:58:38 +00:00
wp_xxyyzz
ac387f67e4 fpspreadsheet: Improve codepage handling for biff2 and biff2 files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3924 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-04 18:15:19 +00:00
wp_xxyyzz
2bf5464fc6 fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3887 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-17 22:57:23 +00:00
wp_xxyyzz
7e599ebd07 fpspreadsheet: Fix arithmetic overflow in ooxml writer in case of empty worksheet but existing row records. Use try-finally blocks around test cases to make sure that memory is released and temp file is deleted in case of exceptions due to failed tests. Fix memory leak in rpn formula calculation (spreadtestgui, however, still reports a lot of memory leaks).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3431 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-05 21:42:34 +00:00
wp_xxyyzz
fe4b0ab8db fpspreadsheet: Add number, string and date/time tests for xlsx reading.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3425 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-05 08:25:17 +00:00
wp_xxyyzz
565df8a3e3 fpspreadsheet: Add test cases for xlsx number and date/time formats. Two fails.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3384 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-26 21:52:59 +00:00
bigchimp
25c9c65dcc fpspreadsheet: FPC trunk on Linux x64 also needs error margins (so FPC 2.6.x on Linux x64 is the only one tested that does not need it).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3341 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 15:34:08 +00:00
bigchimp
dae9095083 fpspreadsheet: error margin seems to be needed on Windows (FPC 2.6.4+FPC trunk), not on *nix (FPC 2.6.4) in contrast to previous commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3340 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 15:24:24 +00:00
bigchimp
b6a01e6814 fpspreadsheet: loose precision tests for FPC trunk floating point values
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3338 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 13:33:04 +00:00
bigchimp
42f55e22d7 fpspreadsheet: tests: get empty temp file just before wrtiing out. Coding style: do begin matches initial style+FPC coding style.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3336 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 13:13:56 +00:00
wp_xxyyzz
18ae11e3e8 fpspreadsheet: Relax error margin for date/time tests to 10 nsec in order to get success in tests back.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3335 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 10:45:17 +00:00
bigchimp
752b1c95e7 fpspreadsheet: allow margin for error testing writing reading date/time. Test failures from 29 to 6
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3334 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 09:53:48 +00:00
wp_xxyyzz
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
wp_xxyyzz
26d5923673 fpspreadsheet: Add currency test cases to ReadString tests for biff8 and ods. Rename ReadDate tests to always show the datemode in the test name. Rename test files "testbiff8.xls" and "testodf.ods" to show datemode (1904) in file name (--> testbiff8_1904.xls, testodf_1904.ods)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3198 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-18 15:44:28 +00:00
wp_xxyyzz
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
wp_xxyyzz
5542b1ac56 fpspreadsheet: Activate all disabled ods date tests & fix some more issues related to inconsistent formats by Open/LibreOffice -> done to 6 errors for 1904 datemode, that's probably the best we can get.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3138 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-04 22:11:17 +00:00
wp_xxyyzz
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
wp_xxyyzz
85a12aad98 fpspreadsheet: Modify numbertests, datetests and stringtests to avoid reopening the same test file again and again.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3123 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-01 19:38:10 +00:00
wp_xxyyzz
1676d31702 fpspreadsheet: Add date/time reading/writing support to BIFF2 and the corresponding "write-read" unit test cases. Passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2988 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-02 18:49:05 +00:00
wp_xxyyzz
f478cb4597 fpspreadsheet: Modify write/read tests for numbers and dates to support any file format. BIFF5 passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2980 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-30 21:22:19 +00:00
bigchimp
3bbc720e3c * Tests: avoid test errors for unimplemented custom format ODF cells
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2919 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-03-25 15:46:05 +00:00
bigchimp
52b97c050d + Tests: add support for LibreOffice/OpenOffice .ods spreadsheets
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2907 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-03-23 11:34:37 +00:00
bigchimp
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
bigchimp
7f7d07f151 + Add support for text/number/date formats in BIFF8/xls.
+ Add support for writing out date/time to non-BIFF8 xls (though as text only for now)
  Slightly modified patch by wp, thanks a lot. 
  See
  http://forum.lazarus.freepascal.org/index.php/topic,22940.msg136761.html#msg136761

Still to do: add test cases for invalid format strings



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2863 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-12-22 14:02:04 +00:00
bigchimp
a98a75327e Tests:
+ added test for GetSheetByName function
+ Added TSpreadInternalTests.ReadDateAsUTF8 to test wp's ReadAsUTF8 forum problem report with date/time cells
* Fixed displaying sheet+column where problems occur (CellNotation function)



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2859 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-12-10 12:06:12 +00:00
bigchimp
abd8d0bea8 + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted
+ XLS BIFF8: added DATE and TIME worksheet functions to RPN formula
* Allow writing formulas,numbers etc using cardinals increasing row/column limits for formats that support it.
* Add checks for text cell size limits when writing xls, xml. If exceeded, cell text will be truncated (better than corrupting the xls file - e.g. try to open it with Excel 2002 - as happens now with xls format)
* Formats that use fpspreadsheet zip have extra checks to prevent crashes for invalid zip dates
+ Use FPC built-in zip format when using FPC 2.7.1+ as it has fixes/improvements (e.g. zip64 support)
+ Added FPCUnit test suite to test reading and reading writing files. For now uses BIFF8 xls; contributions for other formats and more tests welcome. See the tests subdirectory.
+ Add link to msodumper tool for reference/debugging/troubleshooting .xls output

Fixes Mantis bugtracker issue #25388



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2857 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-12-07 13:42:22 +00:00