This is the input file which is of excel format:
| A | B | C | D |
|---|---|---|---|
| APP | 1 | 210101 | 8.1 |
| APP | 2 | 210102 | 8.2 |
| APP | 3 | 210103 | 8.3 |
| Data | 4 | 210104 | 8.4 |
| Data | 5 | 210105 | 8.5 |
| Data | 6 | 210106 | 8.6 |
How to generate output files of excel in below way using Perl?
output file 1 (contains only data from rows of app):
| A | B | C |
|---|---|---|
| 1 | 210101 | 8.1 |
| 2 | 210102 | 8.2 |
| 3 | 210103 | 8.3 |
Output file 2 (contains only data from rows of data):
| A | B | C |
|---|---|---|
| 4 | 210104 | 8.4 |
| 5 | 210105 | 8.5 |
| 6 | 210106 | 8.6 |
Here is an example of how you can split the input file into multiple output files based on the value in column 0 of the input file: