User Guide
×
Menu
Index

ToString Function

 
One of the functions that are often required to make more complex expressions work is ToString. A common scenario is that we need to build a text which includes a certain calculation value. Expressions cannot automatically convert numbers to strings. Therefore, it is impossible to concatenate string and numeric values. In any case, when a system requires a string, and we want to feed it with a number, we need to convert the number to a string. If we are using TabReference to retrieve a specific cell value directly - we can use the FormattedValue property, which will provide a cell value formatted to string based on the display format from Query.
 
 
When working with a more complex formula than a simple cell reference or when the default formatting is not sufficient, ToString can be used. It requires including a specific number format in the formula, such as “0,” “0.00%,” or “#,##0.0.”