Commit Graph

196 Commits

Author SHA1 Message Date
c639d3f13d fpspreadsheet: Modified virtual mode (VirtualColCount, VirtualRowCount and OnWriteCellData were moved from workbook to worksheet). NOTE: THIS BREAKS EXISTING CODE USING VIRTUAL MODE.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4968 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-07-14 19:43:15 +00:00
068aaab404 fpspreadsheet: Fix compilation error, issue 0030185.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4667 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-05-25 05:27:07 +00:00
8ed5356be2 fpspreadsheet: Move check for sheet name length to writer -> Sheet names can be any length now. But saving to Excel will abort if there are more than 31 characters.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4656 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-05-20 21:00:20 +00:00
2a25a3e64c fpspreadsheet: Fix range overflow if formula contains integers > 65535
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4619 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-04-13 10:03:47 +00:00
840ff82715 fpspreadsheet: Fix biff default colwidth broken in prev commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4575 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-19 16:23:35 +00:00
ae7cebf901 fpspreadsheet: Avoid regression by new length units by accessing DefaultColWidth and DefaultRowHeights by means of setters/getters. Marked as deprecated though, "official" method is calling workbook's WriteDefaultColWidth/WriteDefaultRowHeight/ReadDefaultColWidth/ReadDefaultRowHeight which get the units as a parameter.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4574 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-19 15:18:49 +00:00
5b946b751f fpspreadsheet: Add units (mm, cm, in, pts, lines/chars) for column width and row heights. Update all demos (some issues left).
NOTE: This revision breaks existing code if the worksheet's DefaultRowHeight/DefaultColWidth is changed - value must be in millimeters now. Methods for accessing individual row heiths and column widths are fine, but are marked as deprecated, they use the old units. Optionally a unit parameter can be specified.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4568 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-18 19:50:40 +00:00
d5fb9128ef fpspreadsheet: Write defaultrowheight and defaultcolwidth for Excel formats (don't know how ods stores them...)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4543 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-11 22:42:13 +00:00
e4946cf801 fpspreadsheet: Write text format to ods, xlsx, biff8 and biff5
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4539 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-10 10:43:44 +00:00
8abea8d2f7 fpspreadsheet: Support for writing headers/footer images to xlsx. Remove some compiler hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4532 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-08 11:29:13 +00:00
f1c07951dd fpspreadsheet: Move PageLayout to separate unit (fpsPageLayout). Move PrintRanges and RepeatedRows/Cols to PageLayout. Some simplifiations because TsPageLayout is a class now. Prepare for images in header/footer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4530 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-04 23:01:21 +00:00
d2b80cf143 fpspreadsheet: Read print ranges and repeated print rows and columns from BIFF5 and BIFF8 files (xls - BIFF2 does not support them).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4512 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-02-19 19:53:10 +00:00
8eff203daa fpspreadsheet: Write printranges and repeated cells to biff5 files. Related improvements in BIFFExplorer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4501 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-02-14 17:03:20 +00:00
1f55bbd8b7 fpspreadsheet. Support writing of print ranges and repeated header rows/columns by biff8 format
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4499 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-02-14 14:01:51 +00:00
7679ef468c fpspreadsheet: Show message during writing when a formula is not supported by file format. Fix TsWorkbookSource ignoring its set options (i.e. ReadFormulas and AutoCalc working again).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4480 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-01-27 22:17:56 +00:00
aa29b42ebc fpspreadsheet: Add worksheet-BiDiMode. Read/write for Excel5, Excel8, xlsx, ods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4474 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-01-26 11:26:57 +00:00
535273462f fpspreadsheet: Simpler access to clipboard.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4372 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-10-06 12:01:35 +00:00
6fb4bb9c9b fpspreadsheet: Introduce additional parameter ("AParam") when saving workbooks.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4367 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-10-04 13:12:46 +00:00
c10dec52ea fpspreadsheet: Fix writing incorrect biff formats (broken in r4353)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4366 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-10-04 12:37:09 +00:00
39b73bcfec fpspreadsheet: Add "Paste from clipboard" (for biff8 format)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4355 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-24 15:27:28 +00:00
ad8daec47c fpspreadsheet: Add code for copying to clipboard (fpsCtrls), initial version only handles biff8 and biff5 formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4354 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-23 21:40:32 +00:00
6a82944c1c fpspreadsheet: biff writers store selected ranges now.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4353 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-23 13:28:24 +00:00
9f593aa10a fpspreadsheet: Add 1904-DateMode to ExcelXML writer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4344 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-20 14:20:04 +00:00
f9c7e354c5 fpspreadsheet: Clean-up
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4317 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-09 13:20:09 +00:00
62355e2d51 fpspreadsheet: Re-do rich-text format (easier, less code). Fix rich-text issues with utf8 characters.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4257 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-08 16:23:49 +00:00
63f7b01a76 fpspreadsheet: Fix writing of rich-text info for biff5 and biff8 in some special cases.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4249 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-04 18:08:10 +00:00
71fa9ae693 fpspreadsheet: Add redundant information on selected worksheet to xls files (like Excel does). Add code to read/write selected cell in xls, xlsx and ods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4243 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-04 09:42:39 +00:00
6a6f290fda fpspreadsheet: Read/write name of active worksheet (biff5, biff8, xlsx, ods, visual controls)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4240 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-03 19:04:40 +00:00
7c8e0a8b3d fpspreadsheet: Initial support for reading html files (data only, no formats, no nested tables).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4236 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-01 22:11:44 +00:00
954be7d438 fpspreadsheet: Fix writing rich-text to xlsx (Error when Excel opens this file). Fix writing multiline cell texts containing a CR as line ending which is not accepted by xls.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4226 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-07-30 16:28:30 +00:00
a838fe2707 fpspreadsheet: A bunch of updates have run up...
- Activate ReadFromStream from xls5/8, xlsx, and ods readers (issue #0028389)
- Fix ods using correct hyperlink font
- Rich text formatting runs for xls5/8, xlsx, ods (both reading and writing)
- BIFFExplorer: show details of rich-text formatting runs for SST and RSTRING records

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4211 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-07-26 12:40:51 +00:00
e0b25c8f51 fpspreadsheet: Fix WorksheetGrid hanging if cell text contains a manual line break. Fix reading of new subscript and superscript font properties for biff5 and biff8 (Rich-text support not yet fully working here).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4208 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-07-10 09:13:19 +00:00
5b319c45bf fpspreadsheet: Fix rich-text ignoring non-ansi characters. Beginning to handle rich-text formatting runs when reading biff5 files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4204 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-07-09 15:29:44 +00:00
9b89738158 fpspreadsheet: Extend TsFont for sub-/superscripts. Initial implementation of "rich-text" cell format: display in WorksheetGrid and SpreadsheetInspector, read from xlsx, extend TsWorksheet.WriteUTF8Text() for rich-text formatting runs.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4203 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-07-09 11:10:15 +00:00
0d7bdfa06c fpspreadsheet: Move TsCellFormatList from fpsTypes.pas to fpsClasses.pas. Updated chm help file after proof-reading.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4173 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-06-01 19:58:26 +00:00
6eacf13d99 fpspreadsheet: Move all numberformat-related procedures/functions to unit fpsnumformat.pas. Check all demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4170 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-31 20:28:25 +00:00
f8f72e3847 fpspreadsheet: Make number format parser independent of workbook. Some cleanup.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4167 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-31 16:06:22 +00:00
61a55feef8 fpspreadsheet: Release restriction on max 21 numberformats for writing biff2 files; extra formats not read correctly by Excel although I know from Office97 that there can be more than 21 formats in a biff2 file. Add some more unit tests for number format parser.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4166 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-30 22:09:53 +00:00
545bd7ed0f fpspreadsheet: Major reconstructor of color management: no more palettes now, use direct rgb colors instead. May break existing code - sorry! Update all demos and unit tests (passed).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-28 20:08:24 +00:00
400ffe6431 fpspreadsheet: Fix writing of header/footer fonts to ods files. Some cleanup.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4127 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-12 20:51:18 +00:00
4e420fa876 fpspreadsheet: Add unit tests for some more page layout properties (Fit width/height to pages, start page number) (completing the first 1000 test cases...)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4113 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-04 17:38:56 +00:00
607585d146 fpspreadsheet: some more unit tests for page layout (paper size, page orientation, scaling factor)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4112 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-04 11:01:06 +00:00
dfa4df2c1e fpspreadsheet: Write page layout to ods. Fix some page-layout-related bugs for ooxml.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4109 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-02 23:04:59 +00:00
080efbf542 fpspreadsheet: Fix format in predefined test files (test*_1899*.* and test*_1904*.*); fix biff8 ignoring cell format in shared formula range.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4108 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-02 14:25:39 +00:00
e66caefbe0 fpspreadsheet: Add headers and footers to the pagelayout record, implemented for all Excel formats (reading & writing).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4104 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-01 15:14:25 +00:00
82117326a4 fpspreadsheet: Add some more page layout properties (page size, orientation etc) for all Excel and ods formats (ods implementation, however, not correct at the moment).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4103 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-04-30 21:55:55 +00:00
cd397b64d5 fpspreadsheet: Remove TsNumberFormatDialect, not needed by number format parser any more. Fix some issues in visual demos related to number formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4089 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-04-19 22:03:33 +00:00
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
5c2b844bb7 fpspreadsheet: Add formatting of numbers as fractions
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4073 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-31 19:01:16 +00:00
eab9c797ef fpspreadsheet: Add method AddCell to worksheet which does not check if cell already exists. --> some speed-up of reading.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4031 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-14 22:48:38 +00:00