How do I export only visible cells from Excel to CSV?

I am running Excel 2010. At the top of my spreadsheet I have about 10 hidden rows.

When I export to CSV, how do I export only visible cells?


The question seems to be "How do I copy only visible cells?"

The answer is:

  1. Select only the visible cells by first selecting the range then using GoTo (Alt+G), Special, Visible Cells only [This is the same as Sean Cheshire's answer of using Alt-; to select the visible cells only but it shows the path more explicitly].
  2. Ctrl+C (to copy)
  3. Go to a second sheet and paste them (Ctrl+V)

Temporary removal seems a little risky in view of possible interruptions (eg to power!) so I’d suggest working on a copy would be safer. How to copy visible cells only is explained here. However if the hidden rows are all at the top, you could select the first ‘not hidden’ row down to the last and just copy that area. Then export from copy.


My best idea would be to remove the cells temporarily and then revert back to a previous state of the file.

To remove the cells:

  1. Go to File, Check for Issues, Inspect Document.
  2. Check only Hidden Rows and Columns, then click Inspect.
  3. Click Remove All on the Hidden Rows and Columns line.
  4. Click Close.