Forum Moderators: phranque

Message Too Old, No Replies

Converting .txt files to .csv files

Is there a program that can do this?

         

Compworld

4:10 pm on Jun 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I need to convert .txt files into .csv files. How would I go about doing so? I can't use Excel because there are 230,000 records and Excell will only read 65599 max. I need this also in one file, and not broken up.

Any ideas?

Thanks,

CompWorld

jatar_k

4:18 pm on Jun 6, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I usually script things like that.

get a little script that reads the old file and converts each line and writes it to the new file.

what type of layout does the old file have?
what type of layout does it need in the new file?

Compworld

5:32 pm on Jun 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

How do you script something like that? Its just basically a backup of all of products in txt dil. format with the title, product URL, price, avail., etc. Just trying to make it compatible with another program that I use which only uses .csv format.

Thanks,

CompWorld

jatar_k

6:02 pm on Jun 6, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> txt dil. format

i am not sure what you mean. If it is just going from something like tab delimited and converting to comma delimited with no changing of data order it may be even simpler to just open it with something like textpad and do a find and replace.

Or to use a script it can just

open source and destination files
read line from source
change to new format
write to destination
repeat until source file done

vabtz

6:47 pm on Jun 6, 2004 (gmt 0)



compworld its really pretty easy to do.

[edited by: engine at 7:29 pm (utc) on June 6, 2004]
[edit reason] help in forum for everyone's benefit, thanks. [/edit]

rogerd

7:03 pm on Jun 6, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You should be able to import and export using MS Access without the size limits of Excel. I like Excel's import feature a little better, but in this case Access should do the trick.

Compworld

12:03 am on Jun 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

I was able to open it in Access w/o a problem. But how do I save it as a .CSV format file?

Thanks,

CompWorld

2oddSox

12:14 am on Jun 7, 2004 (gmt 0)

10+ Year Member



I was able to open it in Access w/o a problem. But how do I save it as a .CSV format file?

Use File > Export

Then save as a .csv