How to save only some columns of a spreadsheet?

How can I save only some columns of a spreadsheet in csv format?

The situation arises because I need to transform a spreadsheet by modifying a single column according to a formula (which is =MOD(A1-152, 360) ), and then save the spreadsheet with the modified column but not the original one. In more detail, the method is to create a new column, enter the formula into it, and then (hopefully) save as csv. If I delete the original column before saving, the formula becomes an error. If I hide the original column and then save as csv, the original column is saved along with the modified one.

What to do?

I think that post-processing is your best bet here:

  1. Export all the columns in a CSV file
  2. Remove the extra column

There are a number of different methods of removing that extra column, depending upon what OS you’re on and what scripting languages you have available. Here are some good examples in Python:

More elegant and flexible solution: Let’s say you have a spreadsheet with twenty columns and you want to export only columns G and K. Create a second tab in your spreadsheet document. Now you have two sheets: “Sheet1” and “Sheet2”. In Sheet2, enter this formula in the first cell of the first column “=Sheet1.G1” and drag it down the column. This sets the first column in Sheet2 to be equal to column G of Sheet1. Do the same for column K. Now if you export Sheet2 to a CSV file, you are effectively exporting columns G and K of your original spreadsheet. No need to post-process.