Commit Graph

43 Commits

Author SHA1 Message Date
c5f6cbe82d fpspreadsheet: Replace for-to loops by for-in loops if possible. Update example demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3991 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-05 10:35:32 +00:00
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
eb4dbd80e5 fpspreadsheet: Modify demos to write compiled units to the common directory "lib" within the examples folder as far as possible.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3570 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-15 21:27:57 +00:00
c87afdcdec fpspreadsheet: Redo handling for formulas:
- Allow processing of string formulas (conversion to/from rpn formulas, calculation). 
- Drop cell ContentType cctRPNFormula. 
- Drop field RPNFormulaValue of TCell record. 
- Remove all fekXXXX declarations for sheet functions. Function is specified by name now.
- Complete registration mechanism for user-defined formulas.
Adapt all demos
Test cases working
This commit does not yet support: shared formulas, formulas in ods.


git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3506 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-30 18:03:22 +00:00
a043b77519 fpspreadsheet: Remove workbook property ReadFormulas, use option boReadFormulas instead. Update all demos affected. Modify most demos to no longer require the fps package.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3505 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-29 15:32:43 +00:00
ba37ace85f fpspreadsheet: Read entire biff record of label and number cells to speed up reading (30% improvement for biff2). Numerous clean-up, mostly debugger settings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3355 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-21 20:33:25 +00:00
4c723b9fc3 fpspreadsheet: Convert some more biff methods such records are written in a single block (biff2: WriteLabel, WriteNumber, all: WriteFormat, WriteBlank, WriteColInfo).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3325 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-15 21:00:49 +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
30569b00c0 fpspreadsheet:
- laz_fpspreadsheet packages does not need to be designtime, so do not register it
- cosmetic: example projects are .lpr not .dpr; reflect in comments



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3242 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-26 07:15:51 +00:00
24fac70d0c * fpspreadsheet: add readme.txt files for demos
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3223 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-23 11:56:12 +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
5bc0898317 fpspreadsheet: Add note to examples\*read to run the *write program if input file does not exist. Activate all commented code in the examples.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3192 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-18 08:07:00 +00:00
36765d4f9b fpspreadsheet: Fix issues related to biff2 expecting localized formatting strings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3164 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-13 13:33:02 +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
d29219fc68 fpspreadsheet: Mark TsSpreadsheet.GetLastColNumber/GetLastRowNumber as deprecated, use GetLastColIndex/GetlastRowIndex instead.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3101 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-26 15:27:35 +00:00
dde6e12a85 fpspreadsheet: Restore excel2write demo forgotten in previous commit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3079 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-22 12:37:34 +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
169dbe7b4f fpspreadsheet: Fix biff2 writing incorrect xf record index if > 63.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3076 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-22 09:38:28 +00:00
fb92d5a906 fpspreadsheet: Bug fixes for biff2 reading/writing for number formats
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3075 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-21 23:01:07 +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
283a28fabd fpspreadsheet: Fix crash of unit test. Still some number format detection issues.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3046 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-14 23:17:46 +00:00
c3f5600c0d fpspreadsheet: Read results of formulas that return strings
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3045 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-14 16:30:33 +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
f0928db9f5 fpspreadsheet: Row heights now can be saved to all biff versions. Add unit test case for row heights, ok. Bug fixed in BIFFExplorer with format detection.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3019 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-07 18:31:27 +00:00
2b601f687c fpspreadsheet: Write SELECTION records (but does not fix BIFF2 frozen col/row issue). Fix issue of BIFFExplorer with BIFF2 PANE records.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3011 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-05 23:05:08 +00:00
707f64e511 fpspreadsheet: Fix show/hide gridlines/headers issue of BIFF2 by adding WINDOW1 record. Move WINDOW1 record of BIFF5-BIFF8 to xlscommon. Add test cases for BIFF2. ok.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3008 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-04 20:01:21 +00:00
482eac242a fpspreadsheet: Add support for frozen panes in BIFF5/BIFF8 (BIFF2 not working at the moment), fpSpreadsheetGrid, and BIFFExplorer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3005 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-04 18:07:54 +00:00
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
4a16f9bb90 fpspreadsheet: Add unit test for "bold" attribute in BIFF2 and BIFF8. Fix "bold" being incorrectly restored by reading of both formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2966 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-25 09:32:34 +00:00
988b80b4a4 fpspreadsheet: Add column width support (reading & writing) to biff2. Add column width test cases for BIFF2 and BIFF8 -> pass.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2964 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-24 23:05:00 +00:00
887b34383a fpspreadsheet: Add font unit test for BIFF2. Currently fails. Need to investigate...
Fix occasional floating point conversion error in fpsopendocument because of non-initialized format settings.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2963 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-24 22:31:01 +00:00
c61e4418b7 fpspreadsheet: Add reading and writing of font support to biff8, biff2, and fpspreadsheetgrid. Font colors in biff2 not yet working. No test cases yet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2959 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-22 23:10:32 +00:00
f7f1b0f12a fpspreadsheet: Add support for empty cells to all BIFF formats (needed for formatting of empty cells).
Fix painting error of cell borders in fpspreadsheetgrid.
Add/complete reading/writing support for horizontal alignment, cell background and cell borders to BIFF2.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2958 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-21 21:43:43 +00:00
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
519e75d5a6 fpspreadsheet: Implements support to setting if existing files should be overwritten or not
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@993 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2009-11-08 19:21:23 +00:00
f3259be492 fpspreadsheet: improves Excel 5 RPN formulas, add ABS and ROUND functions
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@833 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2009-06-09 21:34:58 +00:00
0ef4baae5a Small fix for bug in excel string write
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@779 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2009-04-18 12:31:46 +00:00
7e67d5e83e fpspreadsheet: Improves OpenDocument support and moved back to 0-based grid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@688 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2009-01-29 13:24:37 +00:00
f8cd84c9ee fpspreadsheet: Improves OpenDocument support and rows/cols are now 1-based
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@686 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2009-01-29 11:30:38 +00:00
e4abbcffc9 fpspreadsheet: Improves OpenDocument support
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@684 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2009-01-28 22:36:41 +00:00
8d4562d0ef Adds unicode support in fpspreadsheet
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@683 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2009-01-28 17:18:04 +00:00
1d2b67596d fpspreadsheet: Initial excel5 reader support.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@657 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2009-01-10 22:58:00 +00:00
6bc68ea9b5 fpspreadsheet: Starts adding read support
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@656 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2009-01-10 21:47:59 +00:00