Removes invalid values from a list or table
The Trim function removes invalid elements or elements that do not contain a value from a list or table. The function can be used, for example, if a column is to be calculated from an imported Excel table in which texts (headings, comments) are also included.
Text strings containing a calculable value are converted into a number. If the transformation fails, it will be removed from the list. In addition, the values are removed infinitely and undefined as invalid.
For tables, an additional parameter can be used to set how the invalid elements should be handled.
Trim (list)
Trim (table)
Trim (table, remRow)
Trim ([1,2,"Hi",4, 5,"6",7]) =1 2 4 5 6 7
a=[1,2,3;4,5,∞;7,8,9]
Trim(a,0)= 1 2 3
4 5 0
7 8 9Trim(a,1)= 1 2 3
7 8 9