LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MS Office Report coma problem

Good afternoon,


I have a problem when exporting data from LabVIEW to Excel, specifically an array of data, there are some data that are passed correctly and others that are not, as they should take comma in the table. I have used a probe to check that the output data are correct and so it is, but when they get to Excel only some data keep the comma and others do not. I attach some screenshots.

Probe:

Borcua_0-1644495363199.png

Excel:

Borcua_1-1644495910895.png

 

 

Thank you very much in advance.

 

Best regards.

 

0 Kudos
Message 1 of 6
(871 Views)

Hi,

 

How are you data given to Excel : As string ? Numeric ?

It can changes a lot. Can you share your vi?

0 Kudos
Message 2 of 6
(856 Views)

Looks like a localization problem where Excel wants to use , as the separator for numbers larger than 999. My assumption is that whatever location the PC is set to normally uses commas as the decimal point before the fractional part of the number. Without seeing any code I can only assume that you are writing to a deliminated text file, and the values there are correct, but Excel is trying to format them to the non-European standard of using comma as the separator for every 3 digits of the non-fractional part of the number. (It just doesn't know what to do with numbers that only have two digits to the right of the , so it leave them as unformatted text.)

0 Kudos
Message 3 of 6
(836 Views)

As numeric DBL. If you want I can do it but actually it contains some sub vi from a power supply and a multimeter so i dont know if you can run it, I can share a screen shoot.

Borcua_0-1644564391403.png

 

0 Kudos
Message 4 of 6
(805 Views)

At least with the VI we can see the whole code.

From the picture we can see you are using a Express VI so even less to see but as StevenD said you should have an option to use local decimal separator (it has to be a boolean).

0 Kudos
Message 5 of 6
(799 Views)

Go in your LabVIEW Options and check on the first settings page if "Use localized decimal point" is disabled. Before you go and enable it, think if you have any projects that you may have disabled this in the past for.

 

The correct setting is that this should be always enabled, and if you need to talk with an instrument that requires for some reason a specific format, to format the numbers accordingly in the instrument driver that you use to talk to this device.

 

Basically you have following different use cases:

 

- Talking with other software on your computer that uses localized settings such as all Microsoft Office applications

  Use the LabVIEW default localized format here then your program will talk to that software as it expects it

 

- Talking with a device that has a specific format requirement, usually decimal point

  Do NOT disable localized number format handling in the LabVIEW settings, instead format the strings to be in the

  format that device expects!

 

The Report generation VIs will use the default format, which is localized if that option setting is checked and decimal point if it isn't.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(772 Views)