LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problema spreadsheet string to array

Salve,

ho provato a convertire una spreadsheet string in un array, in cui ci sono numeri decimali, indicando come formato "%f" ma l'array di output è formato solo dai numeri approssimati all'intero.

Dove è l'errore?

 

Grazie

0 Kudos
Message 1 of 7
(3,387 Views)

Does the string have "." or "," as decimal seperator?

 

If it is different to your country setting, you might need to specify it in the format string.

 

(see also)

Message Edited by altenbach on 12-22-2009 06:35 AM
0 Kudos
Message 2 of 7
(3,380 Views)
I tried both, but it doesn't work
0 Kudos
Message 3 of 7
(3,371 Views)

Could you attach a simple VI containing the string as diagram constant and the code you tried?

 

(Also make sure theat the array has the correct representation (e.g. DBL). Is the terminal orange or blue?)

Message Edited by altenbach on 12-22-2009 06:48 AM
0 Kudos
Message 4 of 7
(3,369 Views)

It is a very very simple code!!

diagram.jpg

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

I would prefer a VI instead of a picture, because it is not possible to tell the actual \-codes of your string. 

 

Try the following:

 

  • Change the display format of the array. By default, is shows 6 significant digits (not decimal digits of precision!), meaning the 325345,2 will be truncated to 325345. (right-click the array element, select display format..., and pick something more suitable.
  • change the format string to "%,;%f" (without the quotes). What is the default decimal separator of your computer?

 

 

Message Edited by altenbach on 12-22-2009 07:09 AM
Message 6 of 7
(3,353 Views)

Hi Alexxx

 

to correctly use the "Spreadsheet string to array" function remember to use the default decimal separator of your OS. Moreover you to set the "delimiter": the default value is "Tab" but you can set the character that you prefer.

 

Ciao!

Message Edited by sisu84 on 12-23-2009 02:56 AM
______________________
Simone S.
Academic Field Engineer - Med Region
0 Kudos
Message 7 of 7
(3,311 Views)