Replies: 3 comments 2 replies
-
|
Hi @adjenks, thanks for reaching out
It really depends on how you process the data in your wrappers/libraries/interactions. Internally, HyperFormula treats data differently depending on its type. For example, number 3.14 is not equal to string "3.14" but you may not need to distinguish them. If I were you, I would proceed with the simple approach (converting everything to strings) and add other types only when encountering problems. PS: Apologies for the late reply 🙈 |
Beta Was this translation helpful? Give feedback.
-
|
Okay, so there's a distinction here. In excel there are two types of strings that I'm aware of. Cells that have their number format set as string, like so: And cells forced to a string using quotes (or just a leading quote) like so: So, so far it behaves as I might expect. I guess whatever can be entered in a cell in excel can be represented as a string in HF, that's all I wanted to know really I suppose. All seems well and dandy thus far. |
Beta Was this translation helpful? Give feedback.
-
|
I think these two functions answer all of my questions:
Basically it looks like string can represent anything; Date, number, boolean, null and undefined are all just available for convenience. Thank you for your help! |
Beta Was this translation helpful? Give feedback.





Uh oh!
There was an error while loading. Please reload this page.
-
I'm curious whether all types are necessary, or if I can express all types using strings. As in a normal spreadsheet, one does not necessarily have to define the type of a cell as a number for example in order for math functions to operate on it properly.
Therefor when I noticed that RawCellContent can be
Date | string | number | boolean | null | undefined, I wondered if it were possible to simplify this to juststringin my own wrappers/libraries/interactions, as it would be much more simple to deal with.So, is there anything that would not work properly if I could never use any type but string? Or could I represent any cell data type using a string input for RawCellContent on setCellValue?
Beta Was this translation helpful? Give feedback.
All reactions