06-05-2016 02:10 PM
Is there a way to read a tab delimitted text file and then write that same data to a csv?
I need to do this, but I don't know how to pass from one type of format to the other.
Can someone please help me?
Thanks.
06-05-2016 02:13 PM - edited 06-05-2016 02:32 PM
I just found the answer to my question: http://forums.ni.com/t5/LabVIEW/Comma-delimited/m-p/1204971#M517314
I just need to do the opposite. The problem I have now is that I need to write this info into a csv as a string array, and I don't know how.
Can someone please help me?
Thanks.
06-05-2016 02:55 PM
The problem I have now is that my app is replacing not only the tab spaces but also the text to ,. How can I fix this?
06-05-2016 03:05 PM - edited 06-05-2016 03:11 PM
Hi Nando,
as a CLAD you should know how to write files!
It's the same as with your array question: to create files you will find functions in the file palette! WTF, there are even functions to create spreadsheet files (aka csv aka tsv)!
I think Bob's answer was giving you the way to solve such basic questions…
Edit after noticing your 3rd post:
The problem I have now is that my app is replacing not only the tab spaces but also the text to ,. How can I fix this?
When you process files as "raw" text you should save them as "raw" text using simple WriteTextFile function.
If you would use ReadSpreadsheetFile to read your tab-separated file you could easily use WriteSpreadsheetFile to save the data as CSV…
But whatever you do: don't mix the options (as long as you don't know what you're doing as it seems right now)!
06-05-2016 03:16 PM - edited 06-05-2016 03:22 PM
I thought I could use the replace array subset, so I can still use the read from spreadsheet vi, but I don't know if that is the right way to go?
06-05-2016 03:24 PM - edited 06-05-2016 03:27 PM
06-05-2016 03:30 PM
what is the vi that goes connected to the read from spreadsheet vi called?
06-05-2016 05:04 PM
I just realized its a write to spreadsheet vi.
06-14-2016 05:18 PM
I did as you told me, but the write to spreadsheet writes all the info in just one cell, instead of multiple columns.
could you please help me again?
06-14-2016 05:29 PM