05-23-2013 08:51 AM - edited 05-23-2013 08:53 AM
Hi people,
I've been searching and found this old thread of someone asking what is the input parameter "Number format". And I dont know what should I put in there. I've tried so many possibilities, but nothing works so far, such as:
0,0
0,?
0,#
#,0
#,?
#,#
?,0
?,?
?,#
and also with @, doesnt works. Where would I find help about this parameter?
I'm using Excel2003, german version, thus local decimal separator is a comma.
I also found this help from NI, but seems doesnt help me either. Do I miss something important?
thanks,
Yan.
05-23-2013 09:07 AM
Even though your local decimal seperator is a comma, I'm pretty sure you need to use the '.' period for the formats.
05-23-2013 09:18 AM
hmm,
I've tried to use the example in Lbaview: "Conditionally formatted Spreadsheet.vi", and change the parameter "Number format" so many times.
But however the result in the excel is still the same, which is some kind of string, with "0,123"- format, and they are not a number format.
Then I need to select them in excel, and change them into numbers.
regards,
Yan.
05-23-2013 09:31 AM - edited 05-23-2013 09:32 AM
Did you try what Wayne.C suggested?
Settings made to Excel via ActiveX are independent of your local settings, so use a dot not a comma as a decimal separator.
Best regards,
Jens
05-23-2013 09:55 AM
Hi Jens, thanks for replying,
yes I've tried his suggestion, using period instead of comma. But still, the number's format shown in Excel doesnt change. No matter what is the format in Labview, in Excel keep showing "0,123" format (and its not a number; which means I need to right-click the cells and change them into numbers manually in Excel).
I need somehow to "skip" this manual step with right-clicking and change to numbers.
regards,
Yan.
05-23-2013 10:17 AM
I just did a test, setting the cell format with a comma (e.g. 0,##) seems to work with a "german" excel. So my first comment is not correct.
How do you transfer your actual numbers to excel? At least it should be necessary to write your numbers with a dot as a decimal point.
Regards, Jens
05-24-2013 02:47 AM
hi jens,
Im using this Append Table to Report.vi to export my table to excel, and I use "%,;%.2f" as string-format input for the Append Table to Reportvi.
(sorry somehow cant upload any picture from this pc).
Hmm, I just noticed, I think I shouldn't export my table using that vi? all data will be in string format exported to excel.
regards,
Yan.
05-24-2013 03:13 AM
Try the format string "%.;%.2f" !!
Best regards,
Jens
05-24-2013 03:41 AM - edited 05-24-2013 03:42 AM
Hi,
I've used your suggestion and some numbers in excel doesnt need to get "right click, change to numbers" anymore (green indicators on the left-top side in some cells are gone). But, I think its still not a number, because I cant use a simple formula, such as in cell A10 I type "= A1/2" (cell A10 equals cell A1 divided with 2) . I got error which says its not a number.
Well, but other thing is found, any format-string I put in the input of Excel Set Cell Format.vi, such as #,########, will be shown the same as "customize #,########" if I right click in a cell in excel and click "Zellen formatieren" (formatting cell). But however, the numbers are still depends on the input of the format I put in the Append Table to Report.vi.
regards,
Yan.