Also accept _xlfn.UNICODE

This commit is contained in:
Bruno Carvalhal
2024-11-10 14:54:53 +01:00
committed by Nicolás Hatcher Andrés
parent 028ae1ce98
commit 63817e2d50
2 changed files with 4 additions and 1 deletions

View File

@@ -569,7 +569,7 @@ impl Function {
"SEARCH" => Some(Function::Search), "SEARCH" => Some(Function::Search),
"TEXT" => Some(Function::Text), "TEXT" => Some(Function::Text),
"TRIM" => Some(Function::Trim), "TRIM" => Some(Function::Trim),
"UNICODE" => Some(Function::Unicode), "UNICODE" | "_XLFN.UNICODE" => Some(Function::Unicode),
"UPPER" => Some(Function::Upper), "UPPER" => Some(Function::Upper),
"REPT" => Some(Function::Rept), "REPT" => Some(Function::Rept),

View File

@@ -15,6 +15,8 @@ fn simple_cases() {
model._set("A8", "=UNICODE(\"\")"); model._set("A8", "=UNICODE(\"\")");
model._set("A9", "=UNICODE(\" \")"); model._set("A9", "=UNICODE(\" \")");
model._set("A10", "=_xlfn.UNICODE(\"T\")");
model.evaluate(); model.evaluate();
assert_eq!(model._get_text("A1"), *"49"); assert_eq!(model._get_text("A1"), *"49");
@@ -26,6 +28,7 @@ fn simple_cases() {
assert_eq!(model._get_text("A7"), *"70"); assert_eq!(model._get_text("A7"), *"70");
assert_eq!(model._get_text("A8"), *"12398"); assert_eq!(model._get_text("A8"), *"12398");
assert_eq!(model._get_text("A9"), *"32"); assert_eq!(model._get_text("A9"), *"32");
assert_eq!(model._get_text("A10"), *"84");
} }
#[test] #[test]