22

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?

5 Answers 5

9

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)
1
  • In Excel/Office 2016, the shortcut to select only visible cells is Ctrl + g, not Alt + g. Also, this selects visible empty columns too, so you'll want to hide those first. Yeah I'm late to the party, I know.
    – RolfBly
    Jan 13, 2022 at 11:23
4

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.

3
  • 1
    a shortcut key to selecting visible cells only is ALT+; - highlight your range, press ALT-:, CTRL-C and then CTRL-V to another sheet/workbook
    – SeanC
    Sep 18, 2012 at 14:53
  • 1
    as I can't use kbd tags in comments, it may be a little clearer if I say its ALT and semi-colon to change a selection to only be visible cells
    – SeanC
    Sep 18, 2012 at 15:25
  • Sadly this doesn't seem to work if you filter out rows between your normal range (if rows aren't hidden). Excel complained that data too complex to go forward with the copy.
    – David
    Jul 28, 2015 at 15:55
2

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.
0

Caveat: this answers the question by way of another spreadsheet program. The following LibreOffice extension, after installation, allows this functionality: 1) Select the desired cell range 2) Click the extension's toolbar button 3) Paste the data into a new worksheet, and save as .csv.

http://extensions.libreoffice.org/extension-center/copy-only-visible-cells

0

If you save once the csv file from excel sheet, excel generates the csv file full of blank spaces, but if you open the csv file and you save it again as csv file using the "Save as" menu, this new csv file won't contain the blank spaces but only the used cells.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .