You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, there is currently no way to create a string CellValue that starts with "=" via the API, because such cells will always be interpreted as formulas. A more robust api would be requiring some explicit constructor or function call for formulas, rather than overloading strings for both text content and formulas.
For example,
row!["=A1+B1", "A1+B1"]
could become
row!["A1+B1", formula("A1 + B1") ]
The downside of this, is of course that it would be a breaking API change.
An alternative might be to keep the !row macro working as now, and just change the Row::add_cell API to always treat String as String and add a Formula type, or even to keep that API as well, but add a new function like Row::add_cell_strict. If necessary the row! macro could grow some tag to explicitly disambiguate strings (potentially) starting with "=".
Assuming the above is not mistaken I'd be happy to work on a PR that implements one of these strategies.
The text was updated successfully, but these errors were encountered:
As far as I can tell, there is currently no way to create a string CellValue that starts with "=" via the API, because such cells will always be interpreted as formulas. A more robust api would be requiring some explicit constructor or function call for formulas, rather than overloading strings for both text content and formulas.
For example,
could become
The downside of this, is of course that it would be a breaking API change.
An alternative might be to keep the !row macro working as now, and just change the Row::add_cell API to always treat String as String and add a Formula type, or even to keep that API as well, but add a new function like Row::add_cell_strict. If necessary the row! macro could grow some tag to explicitly disambiguate strings (potentially) starting with "=".
Assuming the above is not mistaken I'd be happy to work on a PR that implements one of these strategies.
The text was updated successfully, but these errors were encountered: