12-16-2014 02:53 PM
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:
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
Solved! Go to Solution.
12-16-2014 03:02 PM
12-16-2014 03:14 PM - edited 12-16-2014 03:15 PM
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?
12-16-2014 03:18 PM
12-16-2014 03:33 PM
Ok, so that fixed the front panel.
However, the problem still persists:
Is something wrong with my VI?
12-16-2014 03:50 PM
12-16-2014 03:56 PM
Oh, did that before. Doesn't change a thing.
Since you said, I did it again. Still no good. =(
12-16-2014 03:58 PM - edited 12-16-2014 04:00 PM
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.
12-17-2014 02:20 PM - edited 12-17-2014 02:21 PM
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.
12-17-2014 02:54 PM
@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.