LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing spreadsheet containing both numbers and text

I am trying top import a 2D array with 5 columns and a number of rows, using 'read form spreadsheet file.vi'. The numeric data imports OK however the column headers 'x0', 'x1',...'x4' do not import and the first row appears as '0.00'. How do I get these column headers/labels to import also?
0 Kudos
Message 1 of 3
(2,572 Views)
You could always do it in two steps. The first step is to read the header
files by 'importing characters from file'. Make sure you only ask for one
row. (It's an option) Then secondly try mporting by using 'read from
spreadsheet file'. You will have to offseet the beginnining of numeric
portion of the file by the number of your headers for this to work properly,
but that option is provided..

Hope it helps

"RVR" wrote in message
news:506500000008000000CB4F0000-1023576873000@exchange.ni.com...
> I am trying top import a 2D array with 5 columns and a number of rows,
> using 'read form spreadsheet file.vi'. The numeric data imports OK
> however the column headers 'x0', 'x1',...'x4' do not import and the
> first row appears as '0.00'. How do I get these column
headers/labels
> to import also?
0 Kudos
Message 2 of 3
(2,571 Views)
"RVR" wrote in message
news:506500000008000000CB4F0000-1023576873000@exchange.ni.com...
> I am trying top import a 2D array with 5 columns and a number of rows,
> using 'read form spreadsheet file.vi'. The numeric data imports OK
> however the column headers 'x0', 'x1',...'x4' do not import and the
> first row appears as '0.00'. How do I get these column headers/labels
> to import also?

You could use read chars from file and then convert using spreadsheet string
to array. Wire a 2D array of strings constant to the format input to
control the output type.
0 Kudos
Message 3 of 3
(2,571 Views)