Modify a Delimited .TXT File

I’m developing an app that will import data in the form of a delimited .TXT file. I want to process that file and convert it to a .CSV file. How can I do that?

I don’t want the client to have to use Excel or another spreadsheet program to convert the .TXT to .CSV



If the TXT already have the look of a csv, just rename the extension. You don’t need to convert it.

Thanks, Jici. But, the text file uses semicolons as field delimiters. Each field is enclosed in double quotes. And, there are numerical values with commas in them.

So, I believe I need a process that:

  1. Deletes all the commas in any field.
  2. Removes the double quotes.
  3. Changes the semicolons to commas.

If I can do all that, I believe I’ll have a CSV file that I can rename from .TXT to .CSV


semi colon can work as delimiter. I suggest you to try just to rename to csv and try import.