From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-30-2015 12:20 PM
I am trying to write some 2D data to a spreadsheet file, but I am getting extra characters at the start of the file. I only get extra characters when I have a user selected file to write the data to. If I let LabVIEW create the file, then there are no extra characters in the file. I created a VI that shows the problem that I am having.
Am I missing something, or is LabVIEW putting those characters in there for a reason?
Thanks!
-Andrew
Solved! Go to Solution.
11-30-2015 12:31 PM
I cannot reproduce your problem, I get 2 rows appended to the CSV whether I input a filename into the front panel or I leave it blank and use the dialog. Either way, I think you should get rid of the file open and close functions.
11-30-2015 12:37 PM - edited 11-30-2015 12:37 PM
In both your cases you tried was LabVIEW creating the file? If I create the Stats.csv file before running the program and then run the program, that is when I get the extra characters.
11-30-2015 12:44 PM
If I create a blank file in Excel 2010, and save as .csv, I have no problem. I run your VI and I have 3 rows, the first one is blank since the file was already created.
If I create a blank file and save as .xlsx, then go into windows explorer and change the extension to .csv, I get a similar output to yours. It seems like when you create the file before running your VI you might be attaching the .csv extensions to something that is not actually a .csv.
11-30-2015 12:51 PM
The real question is "Where did that initial file come from?" It looks a lot like you just saved an xlsx file and expected it to work like a csv. That will not be the case.
11-30-2015 04:12 PM
@Gregory wrote:
If I create a blank file in Excel 2010, and save as .csv, I have no problem. I run your VI and I have 3 rows, the first one is blank since the file was already created.
If I create a blank file and save as .xlsx, then go into windows explorer and change the extension to .csv, I get a similar output to yours. It seems like when you create the file before running your VI you might be attaching the .csv extensions to something that is not actually a .csv.
Aha! I had a file that was created as a *.xlsx and then converted in windows explorer to a *.csv. That would explain the extra characters when I create the file and no extra characters when LabVIEW cretaes the file.
Thanks!!