LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

format

Hi,
Does anybody know how write some column to an ASCII file so that each
column
will be specified in its own format?
The Write to Spreadsheet File Vi. specifies common format for all
column.

    Thanks in Advance.
 
0 Kudos
Message 1 of 3
(2,690 Views)
To my knowledge there is no way to specify different formats for columns. However, there is a 'cludge' that I believe should work. Build your columns as 1D arrays first. Convert each array into a 1D array of strings with the desired format. Build a 2D array from the resulting 1D arrays, this gives you a 2D array of formatted ROWS. Transpose the 2d array and you will have a 2D array of COLUMNS of the desired format that may be sent to a file. If you find a better way, post it, please.
0 Kudos
Message 2 of 3
(2,690 Views)
If you have a 2D array you can transpose it and than feed the array to a for loop, autoindexing now columns.
feed this to a format into string with a format string from a 1D array of format strings outside the for loop.
use this to generate a 2D array of strings (transpose again and concat this to a string.
try this in a simple example.
greetings from the Netherlands
0 Kudos
Message 3 of 3
(2,690 Views)