LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert 1D of String to 1D array of Double

Solved!
Go to solution

Hello all,

 

Can anyone help me ?

I need to convert 1D arry of string to 1D array of Double 

 

regards 

0 Kudos
Message 1 of 5
(4,115 Views)

You convert the whole row into one string.
How you want convert this set of cells into single double?
Show example of your data

0 Kudos
Message 2 of 5
(4,100 Views)

Hello Artem,

 

Attached you can find the excel sheet and the VI that read the excel sheet and write it in Array 

 

regards 

Download All
0 Kudos
Message 3 of 5
(4,097 Views)
Solution
Accepted by topic author SAED123

You have only one column or data, why you concatenate all into one string

here code

convert.png

0 Kudos
Message 4 of 5
(4,086 Views)

My answer would be "Don't bother, read it in directly as an Array of Dbls".

 

If you make your range be only the rows with numbers, then you can simply read the data (and get a variant) and convert the Variant to an Array of Dbls.  If you have the Report Generation Toolkit, you can use it, but need to "fiddle" a bit to get just the data you want (calculate the "next row" and back up one).

Read Col with RGT.png

Note the RGT needs a 2D array (or a single cell), but it will correctly return a 20-row by 1-col array (and you can extract the 1D Column array with Index Array, if you want).

 

Bob Schor

0 Kudos
Message 5 of 5
(4,066 Views)