Split sheet contents into separate text files.

Wispro

New Member
Joined
Mar 22, 2011
Messages
1
Hello,

I have a large sheet that I need split into separate individual text files.

Each row of the sheet looks like this:

A:
B: 12
C: C:\Full\folder\path\
D: original_filename.txt
E:
F:
G: English words or sentences
H: Chinese characters

Columns A, E and F can be safely ignored.

I will sort by C, then D and then B, to get the original order of the text in each files.

I need a script that will create two identical folders
C:\Full\folder\path-EN\
Where each file inside the EN folder is made up of content from column G only.
C:\Full\folder\path-CH\
Where each file inside the CH folder is made up of content from column H only.

So, use C to recreate the path (+ EN or CH), D to recreate the filename, B to recreate the order of the lines in the text file and G or H as the only content to be added to each file.

Your help would be greatly appreciated.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,224,521
Messages
6,179,282
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top