TABLECELL: Difference between revisions
(Created page with "{{Keyword| <code>TABLECELL ( string , string )</code> | Access the value of a table cell. The first string must contain the table name and the second string the cell r...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Keyword | {{Keyword | ||
| | | | ||
Access the value of a table cell. The first string must contain the table name and the second string 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). The string must reference a single cell. iMath checks whether the table cell has number type or string type and will create the appropriate expression. | 1= | ||
<code>TABLECELL ( [[expression]] , [[expression]] )</code> | |||
| | |||
2= | |||
Access the value 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). The string must reference a single cell. iMath checks whether the table cell has number type or string type and will create the appropriate expression. | |||
Starting with iMath 2.2.6, the second expression may be a vector or an array containing string expressions. iMath will return the values of the referenced cells into a new vector or array of the same structure. | |||
Cell ranges are not supported because if you split/merge cells then the cell addresses become very complicated and a range might not be clearly defined. | Cell ranges are not supported because if you split/merge cells then the cell addresses become very complicated and a range might not be clearly defined. | ||
| | | | ||
3= | |||
<code> | |||
EQDEF cell = "a1" | |||
EQDEF t = TABLECELL("Tabelle1", VAL(cell)) | |||
</code> | |||
Note that [[VAL]] is required here to create a string expression from the variable. | |||
| | | | ||
4= | |||
[[CALCCELL]] [[SETTABLECELL]] [[SETCALCCELLS]] | [[CALCCELL]] [[SETTABLECELL]] [[SETCALCCELLS]] | ||
| | |||
5= | |||
2.2.0 or earlier. | |||
Up to version 2.2.6 only literal strings are allowed, not string expressions | |||
}} | }} | ||
[[Category:Data exchange]] | [[Category:Data exchange]] |
Latest revision as of 13:47, 1 September 2018
Syntax
TABLECELL ( 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
Access the value 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). The string must reference a single cell. iMath checks whether the table cell has number type or string type and will create the appropriate expression.
Starting with iMath 2.2.6, the second expression may be a vector or an array containing string expressions. iMath will return the values of the referenced cells into a new vector or array of the same structure.
Cell ranges are not supported because if you split/merge cells then the cell addresses become very complicated and a range might not be clearly defined.
Example
EQDEF cell = "a1"
EQDEF t = TABLECELL("Tabelle1", VAL(cell))
Note that VAL is required here to create a string expression from the variable.