diff --git a/base/src/test/test_cell_info_n_sheets b/base/src/test/test_cell_info_n_sheets new file mode 100644 index 00000000..ff2d950e --- /dev/null +++ b/base/src/test/test_cell_info_n_sheets @@ -0,0 +1,35 @@ +#![allow(clippy::unwrap_used)] + +use crate::test::util::new_empty_model; + +#[test] +fn arguments() { + let mut model = new_empty_model(); + model._set("A1", "=CELL("address",A1)"); + model._set("A2", "=CELL()"); + + model._set("A3", "=INFO("system")"); + model._set("A4", "=INFO()"); + + model._set("A5", "=N(TRUE)"); + model._set("A6", "=N()"); + model._set("A7", "=N(1, 2)"); + + model._set("A8", "=SHEETS()"); + model._set("A9", "=SHEETS(1)"); + + model.evaluate(); + + assert_eq!(model._get_text("A1"), *"$A$1"); + assert_eq!(model._get_text("A2"), *"#ERROR!"); + + assert_eq!(model._get_text("A3"), *"#N/IMPL!"); + assert_eq!(model._get_text("A4"), *"#ERROR!"); + + assert_eq!(model._get_text("A5"), *"1"); + assert_eq!(model._get_text("A6"), *"#ERROR!"); + assert_eq!(model._get_text("A7"), *"#ERROR!"); + + assert_eq!(model._get_text("A8"), *"1"); + assert_eq!(model._get_text("A9"), *"#N/IMPL!"); +} diff --git a/docs/src/functions/information.md b/docs/src/functions/information.md index cb649fd3..fc5b6bd5 100644 --- a/docs/src/functions/information.md +++ b/docs/src/functions/information.md @@ -11,7 +11,7 @@ You can track the progress in this [GitHub issue](https://github.com/ironcalc/Ir | Function | Status | Documentation | | ---------- | ---------------------------------------------- | ------------- | -| CELL | | – | +| CELL | | – | | ERROR.TYPE | | – | | INFO | | – | | ISBLANK | | – | @@ -20,7 +20,7 @@ You can track the progress in this [GitHub issue](https://github.com/ironcalc/Ir | ISEVEN | | – | | ISFORMULA | | – | | ISLOGICAL | | – | -| ISNA | | – | +| ISNA | | – | | ISNONTEXT | | – | | ISNUMBER | | – | | ISODD | | – | @@ -30,5 +30,5 @@ You can track the progress in this [GitHub issue](https://github.com/ironcalc/Ir | N | | – | | NA | | – | | SHEET | | – | -| SHEETS | | – | +| SHEETS | | – | | TYPE | | – | diff --git a/docs/src/functions/information/cell.md b/docs/src/functions/information/cell.md index 68bfb5e3..120d1740 100644 --- a/docs/src/functions/information/cell.md +++ b/docs/src/functions/information/cell.md @@ -7,6 +7,5 @@ lang: en-US # CELL ::: warning -🚧 This function is not yet available in IronCalc. -[Follow development here](https://github.com/ironcalc/IronCalc/labels/Functions) +🚧 This function is implemented but currently lacks detailed documentation. For guidance, you may refer to the equivalent functionality in [Microsoft Excel documentation](https://support.microsoft.com/en-us/office/excel-functions-by-category-5f91f4e9-7b42-46d2-9bd1-63f26a86c0eb). ::: \ No newline at end of file diff --git a/docs/src/functions/information/n.md b/docs/src/functions/information/n.md index 1a46320b..87b4a501 100644 --- a/docs/src/functions/information/n.md +++ b/docs/src/functions/information/n.md @@ -7,6 +7,5 @@ lang: en-US # N ::: warning -🚧 This function is not yet available in IronCalc. -[Follow development here](https://github.com/ironcalc/IronCalc/labels/Functions) +🚧 This function is implemented but currently lacks detailed documentation. For guidance, you may refer to the equivalent functionality in [Microsoft Excel documentation](https://support.microsoft.com/en-us/office/excel-functions-by-category-5f91f4e9-7b42-46d2-9bd1-63f26a86c0eb). ::: \ No newline at end of file diff --git a/docs/src/functions/information/sheets.md b/docs/src/functions/information/sheets.md index e230a8f0..9c480328 100644 --- a/docs/src/functions/information/sheets.md +++ b/docs/src/functions/information/sheets.md @@ -7,6 +7,5 @@ lang: en-US # SHEETS ::: warning -🚧 This function is not yet available in IronCalc. -[Follow development here](https://github.com/ironcalc/IronCalc/labels/Functions) +🚧 This function is implemented but currently lacks detailed documentation. For guidance, you may refer to the equivalent functionality in [Microsoft Excel documentation](https://support.microsoft.com/en-us/office/excel-functions-by-category-5f91f4e9-7b42-46d2-9bd1-63f26a86c0eb). ::: \ No newline at end of file diff --git a/xlsx/tests/calc_tests/CELL.xlsx b/xlsx/tests/calc_tests/CELL.xlsx new file mode 100644 index 00000000..c7aa5159 Binary files /dev/null and b/xlsx/tests/calc_tests/CELL.xlsx differ diff --git a/xlsx/tests/calc_tests/N.xlsx b/xlsx/tests/calc_tests/N.xlsx new file mode 100644 index 00000000..7471192f Binary files /dev/null and b/xlsx/tests/calc_tests/N.xlsx differ diff --git a/xlsx/tests/calc_tests/N_CELL_INFO_SHEETS.xlsx b/xlsx/tests/calc_tests/N_CELL_INFO_SHEETS.xlsx deleted file mode 100644 index f9d93005..00000000 Binary files a/xlsx/tests/calc_tests/N_CELL_INFO_SHEETS.xlsx and /dev/null differ diff --git a/xlsx/tests/calc_tests/SHEET_SHEETS.xlsx b/xlsx/tests/calc_tests/SHEET_SHEETS.xlsx new file mode 100644 index 00000000..e7efdf35 Binary files /dev/null and b/xlsx/tests/calc_tests/SHEET_SHEETS.xlsx differ