08-13-2013 09:32 AM
Alright folks.
I'd like to use Labview to convert a csv into an xls spreadsheet file.
I was thinking labview could open the spreadsheet, search for the commas "," and convert them into a "/t".
is there a search function that does this?
Solved! Go to Solution.
08-13-2013 09:42 AM
An XLS spreadsheet file has a great deal different in it aside from using tab vs comma for the delimiter. An XLS file is a proprietary Microsoft format that needs to be written from Excel. (Which can be done through LabVIEW) If you simply want to convert a comma separated value text file to a tab delimited text file, that is easy, see attached snippet
08-13-2013 09:55 AM - edited 08-13-2013 10:07 AM
You can do this a bit more simple.
Set Offset if needs
OBS: Swap "," to ";" if needs
08-13-2013 09:56 AM
You still have a text file. Don't give it an .xls extension since it is not a real Excel file.
08-13-2013 10:08 AM
Excel will open the CSV without any issues. You can then save this data in a different format using Excel. If you want to programmatically create an xls file, you will need to use an ActiveX interface, which can be a major pain but can be done.
08-13-2013 10:09 AM - edited 08-13-2013 10:10 AM
The easiest way is to just open the CSV file in Excel. It will figure out that it's commas instead of tabs or at least ask you what the delimiter is. Then, save it as a real XLS.
BTW, if you don't NEED to make it an XLS then don't. A CSV or TSV file is more versatile (and smaller). TSV is generally better since it won't get all confused if you end up working with European spreadsheets that have currency. Remember that they use the comma for their decimal and it can really confuse a CSV formatted spreadsheet.
EDIT: Beat me by a minute... Why do I even try?
08-13-2013 10:42 AM
Thanks for all the helpful replies guys.
I think I confused the matter by stating the file had to be xls, what I meant was just tab delimited.