Commit Graph

60 Commits

Author SHA1 Message Date
wp_xxyyzz
b3deb7c0f6 fpspreadsheet: Fix incorrect usage of single-cell defined names.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9406 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-27 17:14:12 +00:00
wp_xxyyzz
5d03b1ca0e fpspreadsheet: Simplify usage of single-cell defined names. Fix 3D range formulas with defined names.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9404 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-25 21:34:44 +00:00
wp_xxyyzz
52a79e952f fpspreadsheet: Fix defined names for ranges with several cells.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9403 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-25 17:26:35 +00:00
wp_xxyyzz
f6b3b7e9dd fpspreadsheet/defined names: Some refactoring in formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9400 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-25 09:44:07 +00:00
wp_xxyyzz
a7620227c6 fpspreadsheet: Formula support for defined names.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9399 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-24 22:29:17 +00:00
wp_xxyyzz
19e94158df fpspreadsheet: Support defined names in xlsx files. No formula support so far.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9397 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-24 13:20:11 +00:00
wp_xxyyzz
7f8e724978 fpspreadsheet: Fix display of formula with cell range when both ends are equal.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9379 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-05 11:03:46 +00:00
wp_xxyyzz
4fa643f210 fpspreadsheet: Fix copying of formulas with absolute cell references. (https://forum.lazarus.freepascal.org/index.php/topic,67763.0.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9378 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-04 17:13:09 +00:00
wp_xxyyzz
af4a35901d fpspreadsheet: Extend INDEX formula to return columns and rows. Add unit test for it.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9361 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-05-31 13:08:37 +00:00
wp_xxyyzz
79c502f0e9 FpSpreadsheet: Fix INDIRECT formula regarding references to other sheets.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9356 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-05-30 12:04:34 +00:00
wp_xxyyzz
5d277d115f fpspreadsheet: Fix INDIRECT formula when the argument is a string
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9351 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-05-24 21:20:41 +00:00
wp_xxyyzz
021d37e25d fpspreadsheet: Fix formulas with general UTF8 sheet names in xlsx
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8942 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2023-10-09 17:44:35 +00:00
wp_xxyyzz
fb53f95eaf fpspreadsheet: Fix result of formula with unary plus having a string as input.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8257 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2022-04-20 21:33:13 +00:00
wp_xxyyzz
c5c3755b64 fpspreadsheet: Handle numeric cells strings in TUPlusExprNode of the formula parser.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8247 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2022-04-08 17:18:11 +00:00
wp_xxyyzz
520e94f2d7 fpspreadsheet: Fix integer overflow in formulas with large integer values.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8246 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2022-04-08 17:01:55 +00:00
wp_xxyyzz
0f64e793db fpspreadsheet: Fix incorrect column calculation when ODS formula refers to column index > 25 (> 'AA') (https://forum.lazarus.freepascal.org/index.php/topic,59001).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8245 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2022-04-08 10:57:15 +00:00
wp_xxyyzz
5ce0a6ca18 fpspreadsheet: Fix TsUnaryExpressionNode not implementing the IterateNodes method (https://forum.lazarus.freepascal.org/index.php/topic,58969).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8242 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2022-04-04 09:13:40 +00:00
wp_xxyyzz
5b0b5f8f6f fpspreadsheet: Add underscore character ('_') to the list of allowed identifier characters to get a decent error message when a worksheet contains one of the (unsupported) new Excel formulas beginning with this character. Issue #38762.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8000 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2021-04-16 15:26:35 +00:00
wp_xxyyzz
95cc2da283 fpspreadsheet: Fix incorrect handling of cell reference by new forumula INDIRECT(). Add test cases for formula ADDRESS().
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7862 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-11-11 23:43:44 +00:00
wp_xxyyzz
901b92fa72 fpspreadsheet: Some clean-up: Less hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7555 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-22 09:07:59 +00:00
wp_xxyyzz
faf6f72ab8 fpspreadsheet: Rearrange ODS reading code for conditional formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7552 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-21 17:53:20 +00:00
wp_xxyyzz
acb49d9590 fpspreadsheet: Add Excel XML reading support for missing cell-based conditional formats. Fix lost "max compatibility" flag of packages.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7550 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-18 15:57:19 +00:00
wp_xxyyzz
0e392dfcaa fpspreadsheet: Add exception handling for CF expressions writing to the workbook's error log.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7542 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-15 17:00:21 +00:00
wp_xxyyzz
6b3a74ea33 fpspreadsheet: Write conditional formats to ExcelXML files (Office 2003)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7522 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-02 22:36:59 +00:00
wp_xxyyzz
47e9e05399 fpspreadsheet: Refactor dialects in formula parser.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7067 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-07-22 17:49:17 +00:00
wp_xxyyzz
d310b3b9f2 fpspreadsheet: Fix expression parser crashing in GUI with comma as decimal separator.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7065 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-07-21 09:42:19 +00:00
wp_xxyyzz
8e50105ca0 fpspreadsheet: Fix formula parser crashing with an R1C1 formula subtracting cells with a negative relative address.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7051 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-07-18 21:02:44 +00:00
wp_xxyyzz
b7e1b3fee8 fpspreadsheet: Add file missing from previous commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7039 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-07-15 22:54:02 +00:00
wp_xxyyzz
8e86543dde fpspreadsheet: Fix formula parser ignoring errors in binary nodes (see https://forum.lazarus.freepascal.org/index.php/topic,44426.0.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6819 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-02-26 09:03:12 +00:00
wp_xxyyzz
3f113c63bb fpspreadsheet: Some clean-up
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6769 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-12-25 08:58:16 +00:00
wp_xxyyzz
7ce43cda63 fpspreadsheet: Fix boolean formula failures in unit tests (probably introduced by r6570).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6643 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-11 17:21:40 +00:00
wp_xxyyzz
72b96f5788 fpspreadsheet: Fix reading/writing of ods files with quoted sheetnames (https://forum.lazarus.freepascal.org/index.php/topic,42396.msg295937.html#msg295937)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6629 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-30 17:43:42 +00:00
wp_xxyyzz
02e90b8949 fpspreadsheet: Fix usage of empty cells as numeric value 0 in formulas (https://forum.lazarus.freepascal.org/index.php/topic,42396.msg295893.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6627 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-30 15:06:33 +00:00
wp_xxyyzz
f8f096dcf8 fpspreadsheet: Quote sheet names if they contain illegal characters for the expression parser.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6607 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-17 12:00:02 +00:00
wp_xxyyzz
ba5e4da9be fpspreadsheet: Fix bug in formula parser when scanning of ods cell addresses (incorrect extraction of row index).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6577 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-09 22:00:21 +00:00
wp_xxyyzz
6e2cc3fe7e fpspreadsheet: Fix reading of ods files containing formulas with several arguments (separator semicolon). Update unit tests. (Still issues with files posted at https://forum.lazarus.freepascal.org/index.php/topic,42168.msg293792.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6574 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-09 14:28:17 +00:00
wp_xxyyzz
d71884f3e2 fpspreadsheet: Improve prev commit. Fix math formulas with non-numeric strings not returning result #VALUE! Add unit tests for this.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6570 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-05 13:35:25 +00:00
wp_xxyyzz
03d8694142 fpspreadsheet: Add unit tests for some of the recently fixed formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6541 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-26 23:08:01 +00:00
wp_xxyyzz
ce3d71a362 fpspreadsheet: Fix cell references in several formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6534 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-26 15:36:41 +00:00
wp_xxyyzz
cc7ef858c4 fpspreadsheet: Fix circular reference issue and #REF! issue for some formulas (https://forum.lazarus.freepascal.org/index.php/topic,41161.msg288278.html#msg288278)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6486 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-10 20:20:50 +00:00
wp_xxyyzz
38001d24d7 fpspreadsheet: Less hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6456 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-04 11:03:03 +00:00
wp_xxyyzz
394c8032df fpspreadsheet: Fix 3d formulas not changing when rows/cols are inserted/deleted in referenced sheets.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6454 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-04 09:47:08 +00:00
wp_xxyyzz
6c19ca21cb fpspreadsheet: Fix crash when referenced worksheet does not exist.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6453 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-03 11:07:42 +00:00
wp_xxyyzz
f68c5da31c fpspreadsheet: Fix iterative 3d formula correction terminating prematurely.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6449 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-02 11:46:57 +00:00
wp_xxyyzz
79f14f6143 fpspreadsheet: Fix 3d formulas when worksheets are renamed or deleted. Add corresponding test cases.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6448 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-01 17:58:14 +00:00
wp_xxyyzz
40fabfc201 fpspreadsheet: Redo storage of formulas: formulas now are stored in a separate tree independent of the cells tree. The field FormulaValue of TCell record was removed. All unit tests passed. Demos updated (issues of speedtest due to SST in BIFF8 found - not related).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6446 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-30 22:15:07 +00:00
wp_xxyyzz
d5e5df7485 fpspreadsheet: Rearrange units to better avoid circular unit references. General idea: no unit of the package must "use" fpspreadsheet.pas in the interface section.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6444 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-22 22:21:15 +00:00
wp_xxyyzz
fd2a79771a fpspreadsheet: Update cell flag cf3dFormula after parsing of a formula.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6424 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-16 22:31:30 +00:00
wp_xxyyzz
b94ba1fac6 fpspreadsheet: Simplify handling of 3d references. Fix bug related to 3d reference type 'Sheet1:Sheet2!A1'.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6422 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-16 17:44:02 +00:00
wp_xxyyzz
613c96821c fpspreadsheet: Ignore the order of indexes in cell ranges when parsing formulas. Add corresponding unit tests.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6420 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-16 08:45:28 +00:00