Commit Graph

69 Commits

Author SHA1 Message Date
wp_xxyyzz
cfe6c14a8f fpspreadsheet: Clip cell ranges at the sheet dimension limits. Add some test cases for it.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9651 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-26 23:27:47 +00:00
wp_xxyyzz
960402692f FPSpreadsheet: Fix misc bugs in INDEX and INDIRECT formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9646 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-25 10:49:55 +00:00
wp_xxyyzz
7c75ca5398 FPSpreadsheet: Fix INDIRECT for cell range references. Add unit tests for the INDIRECT formula.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9644 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-24 11:48:51 +00:00
wp_xxyyzz
b3fca34799 FPSpreadsheet: Fix formula MATCH support of wildcards in strings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9642 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-19 18:47:36 +00:00
wp_xxyyzz
69fb5b2ea2 FPSpreadsheet: Fix compilation (issue #39106). Add unit test for ADDRESS formula.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9641 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-18 09:17:14 +00:00
wp_xxyyzz
81f20ccfdb FPSpreadsheet: Add unit tests for ACOS, ODD, POWER, RADIANS
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9640 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-17 10:58:14 +00:00
wp_xxyyzz
350efafd15 FPSpreadsheet: Handle missing argument in ROW and COLUMN formulas. Add unit tests for ROW, COLUMN, LOG, LOG10, and fix others regarding error cases.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9639 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-17 08:50:06 +00:00
wp_xxyyzz
ddef318478 FPSpreadsheet: Fix COUNTIF, SUMIF and AVERAGEIF formulas when they contain error values in the arguments.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9624 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-11 18:18:47 +00:00
wp_xxyyzz
8959750876 FPSpreadsheet: Fix MATCH finding wrong duplicate value. See https://forum.lazarus.freepascal.org/index.php/topic,70130.0.html. Update unit test.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9621 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-08 11:02:16 +00:00
wp_xxyyzz
016a7136bb FPSpreadsheet: Fix error in IF formula when second argument contains an error and is selected. See https://forum.lazarus.freepascal.org/index.php/topic,70117.msg546252. Update unit test.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9620 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-02-06 21:26:55 +00:00
wp_xxyyzz
5c33ac9769 FPSpreadsheet: Add more unit tests for formula AVERAGEIF .
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9606 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-01-27 23:05:14 +00:00
wp_xxyyzz
e66040bd5c FPSpreadsheet: Add more unit test cases for COUNTIF and SUMIF.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9605 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-01-26 23:31:57 +00:00
wp_xxyyzz
d80948d93a FpSpreadsheet: More formula calculation unit tests. Fix some formulas for special arguments.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9603 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-01-25 18:32:21 +00:00
wp_xxyyzz
0efab0339c FPSpreadsheet: Add more unit tests for formula calculation.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9602 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-01-24 00:12:37 +00:00
wp_xxyyzz
c5b8b6077c FPSpreadsheet: Fix error propagation in ISERROR formula. Fix Excel pecularities in DATE and TIME formulas. Add formula calculation unit tests.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9597 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-01-23 00:04:07 +00:00
wp_xxyyzz
e5e12455ea FPSpreadsheet: Redo error propagation in formula engine (https://forum.lazarus.freepascal.org/index.php/topic,69893.msg544003.html#msg544003, https://forum.lazarus.freepascal.org/index.php/topic,69900.0.html). Incomplete, formula IsError is broken.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9596 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-01-22 12:02:41 +00:00
wp_xxyyzz
e7384d44ad FPSpreadsheet: Fix formulas with sheetnames containing a dash character (https://forum.lazarus.freepascal.org/index.php/topic,69891.0.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9595 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2025-01-20 18:04:36 +00:00
wp_xxyyzz
712ce264ee fpspreadsheet: Fix formula AVERAGE crashing when all values contain errors.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9447 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-09-18 12:44:41 +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
f972e77759 fpspreadsheet: Fix missing return value of function fpsfunc.CompareStringWithWildCards
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9391 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-17 15:35:53 +00:00
wp_xxyyzz
fe27d6ec34 fpspreadsheet: Fix formula MATCH for match_type 1.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9388 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-17 14:33:12 +00:00
wp_xxyyzz
b026ed55c2 fpspreadsheet: Fix MATCH searching in incorrect direction when match_type is 0 or 1. See https://forum.lazarus.freepascal.org/index.php/topic,67849.msg523596.html#msg523596
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9384 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-15 13:05:11 +00:00
wp_xxyyzz
01fbf93a73 fpspreadsheet: Fix yet another bug in previous commit. Issue #39073
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9383 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-12 15:35:32 +00:00
wp_xxyyzz
3dfb71a70e fpspreadsheet: Repeat unit of previous commit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9382 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-12 10:45:39 +00:00
wp_xxyyzz
d8ca9b905f fpspreadsheet: Fix MATCH formula when 1st argument is a cell (see https://forum.lazarus.freepascal.org/index.php/topic,67849.0.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9381 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-07-12 10:39:37 +00:00
wp_xxyyzz
17d8466ce1 fpspreadsheet: Implement working solution of IFS formula with LibreOffice Calc. (cannot test Excel since I only have v2016)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9370 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-06-22 18:48:39 +00:00
wp_xxyyzz
64197c10db fpspreadsheet: Trying to implement IFS function
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9369 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-06-22 18:33:03 +00:00
wp_xxyyzz
1f686ef1c9 fpspreadsheet: Compare strings in COUNTIF(S), SUMIF(S), AVERAGEIF(S) with wildcards.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9366 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-06-04 09:28:10 +00:00
wp_xxyyzz
09f442d20a fpspreadsheet: Cleanup
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9365 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-06-03 22:19:00 +00:00
wp_xxyyzz
0af3201613 fpspreadsheet: Fix COUNTIFS, SUMIFS, AVERAGEIFS formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9364 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-06-03 22:06:25 +00:00
wp_xxyyzz
8ff431d05e fpspreadsheet: Refactor internal DoIF procedure for calculation of COUNTIF, SUMIF, AVERAGEIF. Prepared from COUNTIFS, SUMIFS, AVERAGEIFS, but not yet working correctly. Add unit test cases for COUNTIF and SUMIF.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9363 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-06-03 21:31:47 +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
a14eab917f fpspreadsheet: Simpler code for the INDIRECT formula (patch by veb86). Add unit test case with string operation in INDIRECT argument.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9360 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-05-30 18:48:27 +00:00
wp_xxyyzz
24b576ad1b fpspreadsheet: Add unit test cases for ROUNDDOWN, ROUNDUP, INDEX and INDIRECT
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9359 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-05-30 15:49:32 +00:00
wp_xxyyzz
999687e0a1 FPSpreadsheet: Update description of INDEX function.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9358 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-05-30 13:42:25 +00:00
wp_xxyyzz
2e64878199 fpspreadsheet: Fix INDEX formula for using 1-d arrays.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9357 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-05-30 13:25:21 +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
6124d2d047 fpspreadsheet: Add INDEX formula.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9355 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-05-29 17:00:22 +00:00
wp_xxyyzz
c335a9e65a fpspreadsheet: Add formula ROUNDUP, fix ROUNDDOWN and ROUND. Patch by veb86 (https://forum.lazarus.freepascal.org/index.php/topic,67428.msg518782.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9353 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-05-28 15:12:51 +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
9cb6e4ae53 fpspreadsheet: More general result of the new IFERROR() function.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9185 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-01-30 17:06:38 +00:00
wp_xxyyzz
211b9489e3 fpspreadsheet: Add IFERROR() function (https://forum.lazarus.freepascal.org/index.php/topic,65991.0.html). Does not work in xls.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9175 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2024-01-26 15:30:01 +00:00
wp_xxyyzz
4bda2d8750 fpspreadsheet: Fix the xxxxIF formulas (COUNTIF, SUMIF, ...) to be case-insensitive (https://forum.lazarus.freepascal.org/index.php/topic,63474.msg480757.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8822 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2023-05-25 15:33:02 +00:00
wp_xxyyzz
3a2cfd397f fpspreadsheet: Check compilation back to Laz 1.4.4/fpc 2.6.4. Update conditional defines in fps.inc.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8734 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2023-02-23 11:42:24 +00:00
wp_xxyyzz
2159bd73ce fpspreadsheet: Fix test suite failures with compiler checks ON.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7989 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2021-04-14 22:17:15 +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
85fe20453e fpspreadsheet: Add built-in formula INDIRECT() (https://forum.lazarus.freepascal.org/index.php/topic,52081.0.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7857 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-11-10 22:00:09 +00:00
wp_xxyyzz
fbe7c7e5f1 fpspreadsheet: Add built-in function ADDRESS(); https://forum.lazarus.freepascal.org/index.php/topic,52081.0.html
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7856 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-11-10 18:49:55 +00:00
wp_xxyyzz
e0503c6d48 fpspreadsheet: Add new formula function ROUNDDOWN().
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7586 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-29 16:38:52 +00:00
wp_xxyyzz
64b69c2893 fpspreadsheet: Fix compilation issue due to stupid 64-bit fpc not being able to pick correct overload of MinValue. Less hints on 64 bit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7556 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-22 17:55:17 +00:00