User: Domenico -- 2012-01-18 << 903 905 >> |
Hits: 3902 |
Type: Text file splitter |
Search all Text file splitter examples |
Description: |
I need to split a CSV file with Header according to value of a column |
Input Sample: |
File=All.csv Channel;Customer;Turnover Discount;AAAAAA;1000 Discount;BBBBB;300 Hiper;CCCCC;1500 Hiper;AAAAAA;2500 |
Output Sample: |
File=Discount.csv Channel;Customer;Turnover Discount;AAAAAA;1000 Discount;BBBBB;300 File=Hiper.csv Channel;Customer;Turnover Hiper;CCCCC;1500 Hiper;AAAAAA;2500 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
Assume your csv file are seperated by ";". 1. ctrl-o open the csv file 2. ctrl-h open 'replace' dialog * set 'replace unit' to 'Line' * set 'search for pattern' to: click 'advanced' tab * set 'run following for each matched unit' to: 3. click "replace", done, all file will be generated under d:\. Note: if you want to create file under d:\test, you need create this folder first, and change all to in step 2. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |