Hi,
I need to convert a text file into a csv format any
simple way to do it.
| SitePoint Sponsor |
Hi,
I need to convert a text file into a csv format any
simple way to do it.


how do you know where the commas are supposed to go?
and where are you going to use this csv file? i bet you could probably just use the txt file

If the file already contains comma separators between the fields then it already is a CSV irrespective of what file extension it uses. If it doesn't already contain the commas then it presumably contains some other character as a field separator and it will just be a simple matter of using a Regular Expression in the language of your choice to convert that separator into commas.
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
It containe commas so i'll try changing the extension to .csv I also
have CSVed


if it contains commas, then it already is a "comma-separated values" file
most places where you can use a csv file don't actually require that you change the extension to .csv
so perhaps you don't need to do anything at all
![]()
I fixed it thanks.
Bookmarks