Commit Graph

146 Commits

Author SHA1 Message Date
f1c9fb3597 * TsWorksheet.ReadAsUTF8Text: readasdate also reads time values unless sure cell is date-only. Thanks wp for the suggestions!
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2861 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-12-10 12:23:02 +00:00
da12b16bb5 * tests: fix testsutility.pas file type.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2860 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-12-10 12:10:28 +00:00
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
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
2172ae9c6e fpspreadsheet: Minor bug fix from forum http:\/\/forum.lazarus.freepascal.org\/index.php\/topic,22667.0.html
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2844 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-11-21 16:13:02 +00:00
fa1ffd579f NaN (Not A Number) values now are read as '' (nothing) instead as "NaN".
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2760 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-07-03 00:01:48 +00:00
30bcff1574 Removed uneeded test code.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2759 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-07-02 23:59:57 +00:00
3517fb8a2c Fixed missing assignment of "DIF first sector", now xls files can be bigger than 7 megabytes.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2758 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-07-02 23:27:25 +00:00
a624b7f671 Handle ID_CONTINUE inside some tags.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2757 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-07-02 15:07:43 +00:00
238e173677 fpspreadsheet: Adds support for RGB colours
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2750 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-06-12 11:02:02 +00:00
be328215cd fpspreadsheet: Minor wikitable fixes
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2749 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-06-11 14:34:28 +00:00
89c7433d5d fpspreadsheet: Adds read/write wiki table format support and some improvements to the base routines
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2747 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-06-11 14:15:59 +00:00
9729dd4d09 fpspreadsheet: Reorganizes the formula writing routine and some comments
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2678 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-02-13 07:38:57 +00:00
6f670fd14d Patch from bug 23733: Adds codepage support to BIFF2
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2677 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-02-13 07:22:29 +00:00
698d941bf1 fpspreadsheet: Fixes a bug with the STT table of strings and the CONTINUE record. The bug prevented reading STT strings after the CONTINUE
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2676 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-02-12 14:49:43 +00:00
e70e659419 fpspreadsheet: Greatly improves the biff8 formula writing, now supports ABS and fixed =Cell+Cell
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2674 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-02-12 12:13:49 +00:00
af3ee31a25 fpspreadsheet: Adds support to writing the formatting of formula and number cells in XLS
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2671 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-02-12 11:29:19 +00:00
95ddacdc6a fpspreadsheet: Patch from bug 22398 which improves the biff2 reader
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2600 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-12-11 16:53:54 +00:00
ca0980e0ed fpspreadsheet: Patch from bug 21400, adds date reading support to the ods reader
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2599 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-12-11 16:46:25 +00:00
04181a810d fpspreadsheet: Adds a work around for a internal compiler error, see bug 22370
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2475 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-07-05 13:34:55 +00:00
1f538d2f04 fpspreadsheet: Structural work to start supporting setting row and column properties
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2466 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-06-13 15:24:44 +00:00
6962323c2e fpspreadsheet: OpenDocument: Adds support for word-wrap formatting option and fixes the styles setting for numeric cells
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2463 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-06-13 07:21:00 +00:00
e4f415e21d fpspreadsheet: Improves the scripts to handle OpenDocument
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2462 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-06-13 06:27:12 +00:00
1149c237b0 Fixes the bug related to unable to open the xls files in Windows 7.
More information here: http://forum.lazarus.freepascal.org/index.php/topic,16716.0.html

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2434 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-05-15 17:47:21 +00:00
29823d09b4 Patch from wp for fixing multiple sheet support in XLSX
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2412 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-04-29 15:22:53 +00:00
60f89d3bfa fpspreadsheet: Minor improvement of encoding support
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2411 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-04-29 15:21:12 +00:00
0ee4ede6b0 fpspreadsheet: Fixes using always point for numbers in OOXML and adds a solution to initialize the format settings in the constructor of the writer
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2410 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-04-27 08:01:15 +00:00
e061c01c66 Fixed memory leak on destroy.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2371 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-03-30 19:25:26 +00:00
624d9b3283 fpspreadsheet: Adds a forgotten part for date/time support
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2264 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-01-23 13:52:43 +00:00
09153c582d fpspreadsheet: Finishes the basic support for date reading
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2263 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-01-23 13:48:39 +00:00
37d06a3d25 fpspreadsheet: Starts preparation to support reading dates from Excel 8, not yet functional
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2262 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2012-01-23 13:24:13 +00:00
a8d77986c0 fpspreadsheet: Small rework of the codepage code into xlscommon
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2199 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-12-25 09:03:20 +00:00
f1c93b7272 Fixes bug 20384, fixes biff 8 compressed UTF-16 reading
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2196 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-12-25 00:04:53 +00:00
442c19fe0a Removes fpsconvencoding in favor of lconvencoding
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2195 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-12-24 23:42:08 +00:00
f8caf9447a Starts improving the xls biff 8 codepage support, doesnt actually work yet
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2194 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-12-24 23:38:24 +00:00
3985c8f1a3 Fixed a bug in UnloadDIFArray when a file open was not successful.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2111 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-11-03 13:04:22 +00:00
2c03552fdf Fixes read of SST table when empty strings are present.
Renamed variable "Continue" to "ContinueIndicator" to avoid conflict with Pascal's Continue.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2110 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-11-02 22:33:19 +00:00
62c89fcf1c fpspreadsheet: Fixes the auto-detection of Excel 8
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1911 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-09-07 05:37:15 +00:00
d887861a83 fpspreadsheet: Adds bold support to ooxml
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1883 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-09-01 07:55:12 +00:00
20c57c5180 fpspreadsheet: Updates the zipper code
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1868 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-29 15:10:10 +00:00
9f27990b0a fpspreadsheet: Fixes remaining ooxml issues, now it actually works
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1867 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-29 15:06:41 +00:00
02caee546b fpspreadsheet: Now OpenOffice can open the generated ooxml
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1866 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-29 14:57:29 +00:00
feb164c7c0 fpspreadsheet: Some more ooxml fixes
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1865 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-29 13:40:10 +00:00
36bcb9079b fpspreadsheet: Some more ooxml fixes
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1864 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-29 13:24:16 +00:00
054f1bacde fpspreadsheet: Some more ooxml fixes
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1863 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-29 13:01:53 +00:00
54e28dd0db Implements the possibility to save a TZipper to a TStream and uses that
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1862 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-29 11:59:47 +00:00
4dafa5ce8d fpspreadsheet: Attempt to implement basic OOXML support
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1861 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-29 10:55:22 +00:00
d8ff486769 fpspreadsheet: Patch from bug 19884, improves the format detection of the reader and adds a writer format auto-detector
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1797 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-11 14:30:25 +00:00
3ac6ba3567 fpspreadsheet: Activates the new OLE for BIFF5, fixes bug 19867
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1778 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-08-02 09:20:07 +00:00
00260da687 fpspreadsheet: String typo fixed and adds a new convinience routine to the grid code
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1682 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2011-06-16 07:55:24 +00:00