Commit Graph

108 Commits

Author SHA1 Message Date
Nicolás Hatcher
c6adf8449b FIX: Dates are only valid up to the last day of 9999 2024-12-30 14:15:09 +01:00
Shalom Yiblet
d04691b790 refactor(dates): adjust date handling logic for improved accuracy
Updated the logic for handling months and days to improve date calculations. Also modified the constants for Excel date ranges to align with supported dates.
2024-12-30 13:12:33 +01:00
Shalom Yiblet
7c32088480 feat: update date 2024-12-30 13:12:33 +01:00
Nicolás Hatcher
6326c44941 FIX: TRUE and FALSE can also be functions
Previously the engine was internally transforming TRUE() to TRUE

Note that the friendly giant implements this only for
compatibility reasons
2024-12-29 19:17:54 +01:00
Nicolás Hatcher
dc3bf8826b FIX: PV Return #DIV/0! instead of #NUM! if rate = -1 2024-12-27 20:19:32 +01:00
Gian Hancock
655d663590 FIX: Make XOR, OR, AND functions more consistent with Excel
The way these functions interpret their arguments is inconsistent with
Excel in a few ways:

- EmptyCell: Excel ignores arguments evaluating to these types of
  values, treating them as if they didn't exist.

- Text: Text cells are ignored unless they are "TRUE" or "FALSE" (case
  insensitive). EXCEPT if the string value comes from a reference, in
  which case it is always ignored regardless of its value.

- Error if no args: Excel returns a #VALUE! error for these functions if
  no arguments are provided, or if all arguments are ignored (see
  above).

- EmptyArg: Bizarrely, Unlike EmptyCell, EmptyArg is not ignored and is
  treated as if it were FALSE by Excel.

- ErrorPropagation: Excel propagates errors in the arguments and in
  cells belonging to any Range arguments.

Additionally, these functions are not consistent with each other, XOR,
OR, AND vary in how they handle the cases mentioned above.

Rectify these consistency issues by re-implementing them all in terms of
a single base function which is more consistent with Excel behavior.
2024-12-26 15:06:54 +01:00
Gian Hancock
8ba30fde33 Add more tests for OR and XOR
Some of these tests fail due to inconsistencies with Excel

cleanup
2024-12-26 15:06:54 +01:00
Nicolás Hatcher
690032c811 FIX: Remove optional context in parser
The context was optional because I thought that paring an RC formula
did not need context.

You at least need the sheet in which you are parsing
For instance toknow if a defined name is local
2024-12-26 10:21:21 +01:00
Nicolás Hatcher
86213a8434 FIX: Add test for get_defined_name_list
Also uses the scope instead of the opaque sheet_id
2024-12-26 10:21:21 +01:00
Nicolás Hatcher
2ed5fb9bbc FIX: Adds some validation and tests 2024-12-26 10:21:21 +01:00
Nicolás Hatcher
e455ed14ea UPDATE: API for defined names 2024-12-26 10:21:21 +01:00
Nicolás Hatcher
5d8e6255a3 UPDATE: Hide/Unhide sheets 2024-12-20 00:49:33 +01:00
Nicolás Hatcher
e098105531 FIX: When cut and paste to a different sheet origin is removed
Fixes #193
2024-12-16 08:01:51 +01:00
Nicolás Hatcher
23814ec18c FIX: Several fixes on the FV function
(1+x)^(1+y) was stringifyfied incorrectly
We still need work on this

FV now returns currency

FV(-1,-2,1) should return #DIV/0! not #NUM!
2024-12-14 22:08:44 +01:00
Gian Hancock
17cd1fee96 Validate arg count for OR function
To be compatible with Excel, at least 1 argument is required.

Fixes #175
2024-12-12 13:06:12 +01:00
Gian Hancock
c59148bdf6 Add tests for OR function
Tests currently fail due to issue #175
2024-12-12 13:06:12 +01:00
Andrew Fillmore
d4a2289826 Add GEOMEAN .xlsx, Update .md files, and Run cargo fmt 2024-12-12 05:58:20 +01:00
Andrew Fillmore
e5aff48e36 Add GEOMEAN Tests 2024-12-12 05:58:20 +01:00
Andrew Fillmore
4c3374c0de Add GEOMEAN to Functions 2024-12-12 05:58:20 +01:00
Sinan Yumurtaci
7058a59c45 two other typos 2024-12-12 05:49:25 +01:00
Sinan Yumurtaci
075760b7ba typo 2024-12-12 05:49:25 +01:00
Gian Hancock
2f660f85a7 Fix clippy lint (#177) 2024-12-11 11:45:24 +01:00
Sinan Yumurtacı
eee40c1b9a FIX: Prevent negative column width, row height (#167)
* Prevent negative column width / row height in rust

* prevent in front-end
2024-12-11 00:07:06 +01:00
Nicolás Hatcher
65f1738473 FIX: Use unicode code points in getFormulaHTML function 2024-12-09 21:46:03 +01:00
Nicolás Hatcher
4ef8a6882f FIX[Format-parser]: Parse [$€]#,##0.00 correctly
We will need to have a look at the format parser sooner rather
than later though
2024-12-09 19:50:41 +01:00
Nicolás Hatcher
4b806c357a FIX[parser]: Check the order (row, column) in range before transforming
Fixes #155
2024-11-30 14:37:06 +01:00
Nicolás Hatcher
e065477b5a FIX: Make clippy happy
This is mostly Rust 1.83
2024-11-29 19:55:12 +01:00
Nicolás Hatcher
1f5f575e7a UPDATE: Update chrono-tzand bitcode crate versions 2024-11-29 19:55:12 +01:00
Nicolás Hatcher
472740f296 UPDATE: Use regex-lite crate instead of of regex
This removes almost 1Mb form the generated wasm(!!!)
2024-11-29 19:55:12 +01:00
Nicolás Hatcher
c1df2cec0b FIX: Issues with paste
Copy/Paste is always with tab separated values not "," or others.
Maybe we can add that?
2024-11-27 22:55:39 +01:00
Nicolás Hatcher
283a44e109 FIX: Aaahhh! Make the linter happy 2024-11-27 22:55:39 +01:00
Nicolás Hatcher
f7dac8b015 FIX: fmt issues 2024-11-27 22:55:39 +01:00
Nicolás Hatcher
df0aa51d14 FIX: Adds some tests 2024-11-27 22:55:39 +01:00
Nicolás Hatcher
411c5de59b FIX: Another round a borders
Only test are missing(!)
2024-11-27 22:55:39 +01:00
Nicolás Hatcher
0df132d5c2 FIX: Work undone
We are not going to follow this path, but I will leave this commit as
part of the git history
2024-11-27 22:55:39 +01:00
Nicolás Hatcher
8cdb3b8c60 FIX: Removes ununsed borders code 2024-11-27 22:55:39 +01:00
Nicolás Hatcher
d08fe32f97 FIX: color picker and border issues 2024-11-27 22:55:39 +01:00
Nicolás Hatcher
d70ab85396 FIX: Adds some more tests fro FORMULATEXT 2024-11-27 22:28:07 +01:00
Nicolás Hatcher
726fc1399d UPDATE: Adds FORMULATEXT for Steve 2024-11-27 22:28:07 +01:00
Nicolás Hatcher
949eafc97f FIX: Removes the csv-sniffer in favour of a simple guess
This removes 500Kb form the was build so it is worth it.
We were using a very old version of the sniffer, the last one might not
have this bug though
2024-11-26 20:13:41 +01:00
Bruno Carvalhal
be6819fec3 Remove unwrap logic 2024-11-17 16:49:41 +01:00
Bruno Carvalhal
e130f784fd add missing test case for multiple arguments in UNICODE 2024-11-17 16:49:41 +01:00
Bruno Carvalhal
c2a2983937 Add missing UNICODE to to_xlsx_string 2024-11-17 16:49:41 +01:00
Bruno Carvalhal
3c49f9a606 Add error cases 2024-11-17 16:49:41 +01:00
Bruno Carvalhal
63817e2d50 Also accept _xlfn.UNICODE 2024-11-17 16:49:41 +01:00
Bruno Carvalhal
028ae1ce98 Change output formatting of UNICODE to Number 2024-11-17 16:49:41 +01:00
Bruno Carvalhal
0ed2984358 Add code coverage 2024-11-17 16:49:41 +01:00
Bruno Carvalhal
0b1199056f Remove unneeded comment 2024-11-17 16:49:41 +01:00
Bruno Carvalhal
726bf677ed Implement UNICODE function 2024-11-17 16:49:41 +01:00
Nicolás Hatcher
420ea9829c FIX: Refactor some finatial functions to use common code 2024-11-17 11:59:10 +01:00