Var (Excel): Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Maxim@tygron.com (talk | contribs)
No edit summary
Maxim@tygron.com (talk | contribs)
No edit summary
 
Line 14: Line 14:
|seealso=
|seealso=
* [[Excel]]
* [[Excel]]
* [[Excel Indicator]]
* [[Indicator]]
* [[TQL]]
* [[TQL]]
}}
}}

Latest revision as of 11:32, 13 July 2026

In this example, the output of the Excel will read "this 1.234,568 is 56 % text". There are not enough places to insert all VARs, so VAR_2 is ignored. However, it is calculated.

In some situations, you may find that the contents output of the Excel file remains mostly constant, save for a number of numerical values. In this case, you can choose to use VAR cells, which serve as additional output cells. The values placed in these cells are read by the Tygron Platform, and inserted into the explanation output. The Tygron Platform will also format the numbers for readability. Specifically, thousands separators will be added (if needed), a decimal separator will be added (if needed), and the number will be rounded to 3 decimal digits.

To define one or multiple VAR cells, name a cell VAR_N, where N is a sequential number starting at 0 (so VAR_0, VAR_1, VAR_2, etc). To indicate where in the explanation the VARs should be inserted, you can create an insertion point by writing "%s" in the explanation. The Tygron Platform will insert each VAR, in order, into these places in the text.

While formulas or conditional structures can vary the number of insertion points, the Tygron Platform only inserts VARs into the final text within the EXPLANATION cell. If you remove a segment of the explanation which contained an insertion point, the VARs which used to be inserted there will be inserted in the next ones instead. If this is undesirable, either keep the insertion points for the VARs in the text, or restructure the VAR cells in the excel so that the correct values are inserted in the correct locations.

The Tygron Platform ignores extra VAR cells if insertion points are lacking, but cannot display the explanation if too many insertion points exist. If that is the case, an error will be displayed instead of the proper explanation.

Lastly, when using VARs, the Tygron Platform will check the output text for any "%" symbols. If you wish to use a literal "%" in your explanation while using VARs, you can instruct the Tygron Platform to leave it as is by writing "%%" instead.

See also