ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting problems with period decimal separator

I want to convert a spreadsheet string of floatin point decimals into an
array.
spreadsheet string uses period decimal separators, the array shall use
commas.
But by converting it using the Spreadsheet to Array.vi I lose the fractional
part, all decimals are rounded to integer.
Do I use the wrong format syntax (" %.3f"), or is there another trick?

thanks for help,
Daniel
0 Kudos
Message 1 of 3
(2,920 Views)
Hi Daniel,
I think you'll have to use "%.;" to set the decimal separator to ".".
See this question : http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000A1CE0000&USEARCHCONTEXT_CATEGORY_0=_49_%24_6_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_INCLUDE_0=decimal+separator&USEARCHCONTEXT_INCLUDE_S=0&UPostedFromTimeSearchArg_0=29&UPostedFromTimeSearchArg_1=10&UPostedFromTimeSearchArg_2=2003&UPostedFromTimeSearchArg_S=4&UPostedToTimeSearchArg_0=26&UPostedToTimeSearchArg_1=4&UPostedToTimeSearchArg_2=2004&UPostedToTimeSearchArg_S=4&USEARCHCONTEXT_TIER_0=2&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=decimal+separator&USEARCHCONTEXT_QUESTION_S=0

Hope this helps !
Julien
0 Kudos
Message 2 of 3
(2,920 Views)
Hi,

You might try "%,;%.3f" or "%.;%.3f". I think the string has decimal "," and
"." is expected, or visa versa.

Regards,

Wiebe.



"Daniel Ewert" wrote in message
news:c6j2hs$qc8$1@nets3.rz.RWTH-Aachen.DE...
> I want to convert a spreadsheet string of floatin point decimals into an
> array.
> spreadsheet string uses period decimal separators, the array shall use
> commas.
> But by converting it using the Spreadsheet to Array.vi I lose the
fractional
> part, all decimals are rounded to integer.
> Do I use the wrong format syntax (" %.3f"), or is there another trick?
>
> thanks for help,
> Daniel
>
>
0 Kudos
Message 3 of 3
(2,920 Views)