Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How save each row of .csv or .xls files as separate txt or csv files?

Status
Not open for further replies.

AndreBell

Technical User
Apr 28, 2008
2
I've been searching almost non-stop for four days (stopping only to eat, sleep, and take the occasional shower) and screwing with more than 100 apps and visiting hundreds of sites looking for a file conversion tool, but with zero luck.

From my old DOS/pc-file days I vaguely recall it was possible to export or parse dbase records as separate text files way back in the 80's by piping search or reporting output to files somehow. Was so long ago I can't recall how I used to do it back then. And no clue how to do the same in a windows environment :-(

Anyhow, whether this can be done in excel or access isn't important or even mysql, just as long as each record is exported or saved-as to its own file. I'm flexible about the method, it's the end result I'm after.

The naming convention isn't important either. If this is doable via access, using the primary key as the file name is fine since it's a unique field.

Oh, I'm not a programmer so if this could be something do-able for the average joe or something off-the-shelf...that would be great.

thanks for the help!
 
What's the business case for splitting a CSV into separate files for each row of the CSV?

I remember the old DOS/pc-file days, and as far as I remember you exported data records to a single file for the database, and not a separate file for each row of the database.

So it sounds like you'd have to do this with VBA ( there's a separate forum, forum707 for this ).

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 




Hi,

A subset of data per key value.

1. You IMPORT the file into Excel using Data > Import External Data > Import File... and parse into columns via the import wizard.

Make sure that you have one row of headings in row 1.

2. You make a list of the UNIQUE Key values, which may be the values in Column A.

3. Turn on the AutoFilter.

4. Turn on your macro recorder and record filtering one Key value.

5. Post back in Forum707 for a customization of your recorded code.

Skip,

[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue]
 
Thanks for the help. A perl programmer gave me a script last night that automatically pulls the info out of csv files.

Requires access to Perl either on remote server or local install of Activeperl in Windows. Not a good solution if a person is windows-only literate but works for me. Especially since I will probably have around 400 of these files I need to work on over the next two months //ouch// and doing this with as little manual importing/converting as possible is ideal.

Thanks again.

Andre
 



If you do what I suggested, it's pretty simple -- NOT rocket science!

Skip,

[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top