"I have a folder full of text (.txt) files, they are delimited with a pipe character. I need to convert the entire folder of TXT files into CSV files. The additional problem is that each file can have no more that 10 rows of data in each CSV file. They can have less, but not more. I need a macro to convert all the TXT files into CSV file, splitting each file up as it goes into just 10 rows per file."
- The user can designate the path to the text files files
- The user can designate the path save the created CSV files
- The user can designate what the delimiter is in the current files. (if left blank, a comma is used by default)
- The user can designate how many rows per created CSV file. Each file is split into that many rows per CSV (if left blank, no parsing is done, files are simply converted)
- Saved CSV files are numbered incrementally using the original TXT filename
- The macro does not path check, make sure the folders exist and are listed properly on the Control Panel sheet (file attached above)
Using the file attached above, fill in the parameters and run the macro as instructed. Here is the included code:
Nothing says "thanks" like a steak dinner!