Owning Palette: String Functions
Requires: Base Development System
Converts an array of any dimension to a table in string form, containing tabs separating column elements, a platform-dependent EOL character separating rows, and, for arrays of three or more dimensions, headers separating pages.
Add to the block diagram | Find on the palette |
delimiter is the value used to separate fields in the spreadsheet file. The default is a single tab character. | |||
format string specifies how to convert the input array into a string. Use %s to convert an array of strings to spreadsheet string. Use %d or %f to convert arrays of numbers to spreadsheet string. Use the format string syntax.
|
|||
array specifies the input samples. | |||
spreadsheet string is separated into columns by delimiters, such as tabs, and an end-of-line (EOL) character separates rows. |
For arrays of three dimensions or more, each page is preceded by a series of indexes of the following format.
[n,m,…,0,0]
where n is the highest dimension index, m is the next highest dimension index, a comma (,) separates indexes, 0,0 refers to the first row and column elements of page n,m,…, and represents the end-of-line character.
In the following example, a spreadsheet string of a 4x4x3 array appears as it does when you print it. The period character (.) represents omitted values of the latter pages, and the end-of-line character () does not appear in an actual printout.
[0,0,0] | ||
1.3 | 2.6 | 5.7 |
3.9 | –4.2 | 6.5 |
–5.5 | 9.3 | 3.3 |
9.6 | 9.8 | 0.4 |
[1,0,0] | ||
. | . | . |
. | . | . |
. | . | . |
. | . | . |
[2,0,0] | ||
. | . | . |
. | . | . |
. | . | . |
. | . | . |
[3,0,0] | ||
. | . | . |
. | . | . |
. | . | . |
. | . | . |
Refer to the Array to Spreadsheet String VI in the labview\examples\Arrays directory for an example of using the Array To Spreadsheet String function.