LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert a text file to a.CSV

Solved!
Go to solution

How do I convert a text file to a.CSV file

0 Kudos
Message 1 of 13
(438 Views)

A CSV file is just plain text file with the convention that rows are separated by linebreaks and columns (typically) separated by commas.

 

What is the structure of your text file and what is the purpose of all this?

0 Kudos
Message 2 of 13
(420 Views)

It's just the tab delimited measurement data file

0 Kudos
Message 3 of 13
(414 Views)
Solution
Accepted by LED47

I realize I just have to call it up in Excel, I was open you could give me just the extra bit where I would set it as a CSV file and save it

 

LED47_0-1760643961639.png

 

0 Kudos
Message 4 of 13
(396 Views)
Solution
Accepted by LED47

All you need to do is read it as a string, replace all tabs with commas, then save it again.

 

Of course excel has no problem also reading tab delimited files directly. I still don't see the purpose of all this. Using a comma as column delimiter could get problematic if you share it with someone in a location where the decimal delimiter is also a comma.

0 Kudos
Message 5 of 13
(366 Views)
Solution
Accepted by LED47

@altenbach wrote:

Using a comma as column delimiter could get problematic if you share it with someone in a location where the decimal delimiter is also a comma.


It could also be a problem if you actually need a comma in a string value.

 

I'm with Altenbach. If all you need is something that can easily be opened by Excel, a tab delimited text file works just fine. I do it all the time.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 13
(356 Views)
Solution
Accepted by LED47

And also, I've had people asking for CSV files, when they meant TAB-delimited. So make sure you have the requirements of the assignment correct before doing unnecessary work.

Certified LabVIEW Architect
Message 7 of 13
(328 Views)

Okay thank you very much to everyone I think I understand now

0 Kudos
Message 8 of 13
(315 Views)

My intention with the following:

Open a text file as a CSV:

Then save the CSV

 

Result opens in memory as a CSV... Actual saved file is not in the CSV format.

 

LED47_0-1760714068067.png

 

Download All
0 Kudos
Message 9 of 13
(281 Views)

Did you not like the solutions you already got?



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 13
(263 Views)