User: editor -- 2010-12-09 << 673 675 >> |
Hits: 3381 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
How to extract column X from csv file where X is decided by column A? How to select column conditionally by the number in column A? If column A is "2", then extract column B, if column A is "3", then extract column C, and so on... |
Input Sample: |
2,B1,C1,D1,E1,F1 3,B2,C2,D2,E2,F2 5,B3,C3,D3,E3,F3 |
Output Sample: |
B1 C2 E3 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open csv file 2. ctrl-h open 'replace' window * set 'Replace Unit' to 'Line' * set 'Replace with pattern' to: * click 'Settings' page, set 'Input delimiter' to 'other', and enter a comma "," in the following entry. 3. click "Replace", done. 4. ctrl-s save to file. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Settings_Window |
Similar Examples: |
How to extract column 1 and 7 from csv files and replace each dash with space? (64%) How to extract 3,4,5th columns from csv file and replace comma with space? (63%) How to extract the first and last lines where the second column is the same? (62%) How to batch sort csv files by the order of value in the specified column? (60%) How to delete the 4th column from text files with 8 columns? (59%) How to substract one csv file from another according to value of column A? (58%) How to extract and join text from multiple files with user defined format? (57%) How to extract lines with specific words in first column? (56%) |
Check Demo of Advanced search and replace |
Keywords: |
chm conditional condition extract column extract colum dec delimiter settings comma setting extract by column extract column from csv csv extract column extract column csv extract csv extract number search by column search and replace column in a csv file |