LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with Report Generation Toolkit: Excel Set Cell Format.vi

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. 

 

0 Kudos
Message 1 of 9
(3,570 Views)

Even though your local decimal seperator is a comma, I'm pretty sure you need to use the '.' period for the formats.

0 Kudos
Message 2 of 9
(3,561 Views)

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. 

0 Kudos
Message 3 of 9
(3,554 Views)

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

Kudos are welcome...
0 Kudos
Message 4 of 9
(3,547 Views)

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.

0 Kudos
Message 5 of 9
(3,541 Views)

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

Kudos are welcome...
0 Kudos
Message 6 of 9
(3,534 Views)

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.

0 Kudos
Message 7 of 9
(3,515 Views)

Try the format string "%.;%.2f" !!

 

Best regards,

Jens

Kudos are welcome...
0 Kudos
Message 8 of 9
(3,511 Views)

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.

0 Kudos
Message 9 of 9
(3,507 Views)