Via a different service, I export a CSV file which I then import into Google Sheets. I then manually clean up the file in order to print out reports.
The issue is, the imported CSV file contains a bunch of columns of data which I do not need. However these columns are never in the same order, so I can't reference the columns by a, b, c, 1, 2, 3, etc. The first row always contains the column headers, so if I can reference the columns by the text in the first row then that would be great.
All I want to do is:
- Import CSV
- Run Script which deletes all non-required columns so only the columns I need exist.
Currently my import process is:
- Go to shared folder in Google Docs
- Create new Google Sheet
- Import the CSV file
- Manually delete all columns and clean up the spreadsheet so I then print it.
I am open to various methods of doing this (even if it makes having a script make a copy of the sheet and only putting the required columns in the new sheet), but would like to avoid having to use a 3rd party add-on or service.