SETTABLECELL

From iMath
Revision as of 19:03, 29 August 2018 by Jrheinlaender (Talk | contribs)

Jump to: navigation, search

Syntax

SETTABLECELL { expression , expression , expression }

Implemented in iMath since version 2.2.0 or earlier.

Up to version 2.2.6 only literal strings are allowed, not string expressions.

Explanation

Set the value, string or formula of a table cell. The first string expression must contain the table name and the second string expression the cell reference (you can see both if you click into the table cell and then look at the status bar at the bottom of the Writer window). You must reference a single cell. iMath checks whether the expression is a real number and sets the table cell to a double-precision floating point value. If the expression is a string and begins with =, iMath will set the table cell to a formula. Otherwise the table cell will be set to a text.

Example

The following example will increment the value in cell A1 of table Tabelle1 at each iMath recalculation run.

EQDEF cell = "a1"

EQDEF z = TABLECELL("Tabelle1", VAL(cell))

SETTABLECELL {"Tabelle1", VAL(cell), VAL(z+1)}

Note that VAL is required here to create a string expression from the variable.

See also

CALCCELL SETCALCCELLS TABLECELL