LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spreadsheet String To Array , NEED HELP PLS!!!

Hi everyone!!! Need a help! I can't understand why when i make array from spreadsheet string (photo in atachment) result is integer??? When i wrote that string format is %f   %5,18f  %d....actually i tried all combinations!!!! How can i got result like in strings help.

Delimetr is enter.

Thanks!!!!

 

Download All
0 Kudos
Message 1 of 7
(3,545 Views)

Hi teslo,

 

I can't understand why when i make array from spreadsheet string (photo in atachment) result is integer???

Usually this happens when you use OS settings with different decimal delimiter like German OS settings. Here the OS uses the comma instead of a point: LabVIEW doesn't understand to convert "4.99" correctly in this case.

 

When i wrote that string format is %f   %5,18f  %d....actually i tried all combinations!!!! How can i got result like in strings help.

Did you read the LabVIEW help for SpreadsheetStringToArray?

Did you follow the link for the format string explanations?

Did you go through that list showing all kind of format strings?

Did you notice the format string "%.;" and did you read its meaning?

RTFM!

Try "%.;%f" as format string!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(3,523 Views)

Yes, i did it all, but nothing....

Mb it's real OS, do you know how i can eliminate it?

Message 3 of 7
(3,514 Views)

Hi teslo,

 

why don't you attach a VI with your example data? We cannot debog or improve images with LabVIEW…

 

Mb it's real OS, do you know how i can eliminate it?

What means "Mb"? What is a "real OS"? What do you want to eliminate? Do you want to "eliminate the OS"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,511 Views)

The resulting output is determined by the wired input. If you want integers, the format string needs to be correct, but you also need to wire an array of integers as input. If you have an array of floats wired to it, right click the constant in the array and change the representation to integer. Never mind, got it the wrong way around. %,;  or %.; should fix it.

0 Kudos
Message 5 of 7
(3,501 Views)

"%.;.%10F" it helped me. Thanks))))

0 Kudos
Message 6 of 7
(3,464 Views)

As the starter of the thread, you have the honer, power and responsebility to select a solution! I think GerdW hit the nail (the 10  for scanning from string is not needed), so please consider marking his answer as solution. Some of us (champions) can do that, but it's really something you should do. It helps others (searching and answering) to make sense of the forum. Thanks in advance.

Message 7 of 7
(3,410 Views)