LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Different spreadsheet output on French locale

Solved!
Go to solution

Hi guys,

 

So I moved some VIs over to another laptop. The laptop language is set to French. Now, my output is different. I changed my laptop language to English, in hopes of having it work properly again. No luck.

 

Look at the screenshot below:

labview.PNG

It is supposed to separate into different columns at those commas.

 

But in French, a comma is equivalent to the English decimal.

 

Anybody know how to fix?? Changing to English Operating System does not work.

 

I attatched VI below.

 

Thank you all

0 Kudos
Message 1 of 14
(6,318 Views)

Try this:

 

In Excel go to File -> Options -> Advanced -> Editing Options section. Uncheck Use system separators and set decimal separator to "."

 

Ben64

Message 2 of 14
(6,310 Views)

Very good idea. 

 

I did it, but does not fix.

 

Is there similar option for the in Labview? Please refer to picture below. Could that be another issue?

 

 1.PNG

0 Kudos
Message 3 of 14
(6,305 Views)

In LabVIEW: Tools -> Options -> Front Panel -> General section. Uncheck Use localized decimal point.

 

Ben64

Message 4 of 14
(6,301 Views)

Ok, so that fixed the front panel.

2.PNGHowever, the problem still persists:

 

3.PNG

 

Is something wrong with my VI?

0 Kudos
Message 5 of 14
(6,293 Views)

The delimiter input of your Write To Spreadsheet File.vi are not connected so they use the default tab separator. Connect a string constant to these inputs and type in a comma.

 

Ben64

Message 6 of 14
(6,286 Views)

Oh, did that before. Doesn't change a thing.

 

Since you said, I did it again. Still no good. =(

 

4.PNG

 

 

0 Kudos
Message 7 of 14
(6,281 Views)

That looks just fine.

 

The problem is that Excel is kind of stupid when it comes to opening CSV files.  Even though it knows how to open text files, and it even knows how to open text files that have a CSV extension, it doesn't seem to want to accept the comma as delimiter by default. 

 

MICROSOFT YOU IDIOTS.  CSV=COMMA SEPARATED VALUE.  RECOGNIZE THE COMMA AS A SEPARATOR!

 

You might be better off using a tab as the delimiter as that is what Excel recognizes by default.  But then you are using a "tab separated value" file.

 

In the days when you could "Import Text File" from the file menu (newer versions of Excel seem to have buried this if it still exists), you would get a dialog box for how to import.  The tab would be checked by default, but you'd have to go and check the comma checkbox.  I'm not sure how you get Excel to do what it is supposed to now.

 

What you can do is that once the data is in one column in Excel, use Text to Columns under the Data menu.  It will then spread that one column out into multiple columns.

Message 8 of 14
(6,277 Views)
Solution
Accepted by topic author dan190

I was able to use semicolons to separate the variables in the CSV format. To do this I replaced all the commas in your LabVIEW code with semicolons. This only worked for me if the decimal separator was a comma instead of a period in excel. With the decimal separator being a comma in excel, the semicolon worked the same way the comma normally would.

 

Matt P.
Applications Engineer
National Instruments
Message 9 of 14
(6,228 Views)

@RavensFan wrote:

MICROSOFT YOU IDIOTS.  CSV=COMMA SEPARATED VALUE.  RECOGNIZE THE COMMA AS A SEPARATOR!


Well, in countries with comma as decimal seperator, a comma will not work as field separator. There is no good standard, but as Matt said, using a semicolon as field delimiter sometimes works. (see also this disucssion)

 

Instead of using csv files, I would recommend to use the default tab delimiter and save the file as *.txt. Excel will have no problem opening it.

Message 10 of 14
(6,219 Views)