LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spreadsheet String To Array Function

Solved!
Go to solution

can someone help me in understanding how to convert the .txt spreadsheet into double array. It looks like the function is only readin the first charater. The vi was working fine (XP LV2011 SP1) before I migrate to win7 (LV2011 SP1).

 

0 Kudos
Message 1 of 8
(4,218 Views)

you are using "d" - this converts to intergers, use %3f for floating point numbers (or %3g %3e %3p etc  - look ate the context help for string conversion formats)

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 2 of 8
(4,213 Views)

correct.

I changed that to float %f, but still I only have first character of each string number... what can I do

0 Kudos
Message 3 of 8
(4,200 Views)

have you tried:

%.3f

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 4 of 8
(4,195 Views)

It's your decimal point being a comma, problem.

Message 5 of 8
(4,188 Views)

RavensFan wrote:

 

It's your decimal point being a comma, problem.


&$%$$ - I looked at that myself but didn't think it was a comma. Must get eyes checked soon!!

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 6 of 8
(4,181 Views)
Solution
Accepted by topic author oli_dragon

He needs to make his format string %.;%.3f  The %  {period} {semicolon} tells the format string to interpret that string properly with decimal points rather than using the system setting which happens to be a decimal comma since that is what the array is showing.

Message 7 of 8
(4,166 Views)

Great

%.;%.3f works perfectly. thanks guys

0 Kudos
Message 8 of 8
(4,097 Views)