06-24-2010 10:52 AM - edited 06-24-2010 10:54 AM
Hello good people, I'm experiencing some problem when trying to generate an Excel-report, please see image below:
Note that excel removes the decimal separator in case of the number is >1 (so that 1,000 becomes 1000) and if the number is <1, excel interprets it as a text string (Excel say something like "The number in this cell is formated as text, or is preceded by an apostrophe"). How to get rid of these problems? I would like an integer to appear as the same integer in excel, and any number less than one to be interpreted as a number!
Solved! Go to Solution.
06-24-2010 11:47 AM
Try to disable the localized decimal point: Uncheck Tools -> Options -> Front Panel -> Use localized decimal point
and restart LV.
06-24-2010 01:01 PM
For me its a bug. Labview or Excel, you know?
06-24-2010 03:08 PM
Thank you for your answer Mr.. candidus!
Unfortunately, I won't be able to return to my labVIEW-program until next Thursday, but I figured I would get my question "out there", to let some of the brilliant minds get a go at it (cause I'm a newbie) 🙂
If I do disable the localized decimal point for this VI, do you think I will be able to use this as an subVI without changing the decimal separator-settings of the calling VI's?
My Excel also prefers floating numbers with a comma, but I can't understand why numbers less than one wont be treated as numbers right away?
06-25-2010 02:19 AM
I think this solve the problem
António
06-25-2010 02:43 AM - edited 06-25-2010 02:45 AM
If I do disable the localized decimal point for this VI, do you think I will be able to use this as an subVI without changing the decimal separator-settings of the calling VI's?
My Excel also prefers floating numbers with a comma, but I can't understand why numbers less than one wont be treated as numbers right away?
Hallo OscarJ,
unfortunately the decimal point setting is global so the calling VI is affected, too.
But there are other possible solutions: You can convert your double array into a string array. The "number to string" conversion functions allows to disable the localized decimal point explicitely:
Now you can append the text to your report.
Your excel seems to interpret ',' as thousands separator and '.' as decimal separator, thus the incorrect number conversion. That seems to be a little bit strange since you say it prefers ',' as decimal separator... Perhaps it has something to do with the office report generation toolkit.
07-01-2010 02:18 AM
06-12-2013 05:36 AM
thanks candidus!!