Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible, when exporting a Google Spreadsheet into a CSV, to apply this operation only to filtered set of rows?

I need to get in CSV exactly the rows which are visible on the sheet after a filter is applied to it.

share|improve this question

migrated from superuser.com Aug 23 '12 at 5:44

This question came from our site for computer enthusiasts and power users.

up vote 4 down vote accepted

Apparently not. I've just wasted half an hour trying to figure out a way to save filtered data, to no avail. It always saves all rows, regardless of the filter selection.

share|improve this answer
Seems so. Google Docs are very clumsy in some obviuos use cases. – Stan Mar 26 '12 at 9:32

Old-school way:

  • select filtered set of rows
  • copy to clipboard
  • create new sheet
  • paste (or paste special -> paste values only)
  • download this new sheet as CSV
share|improve this answer
This indeed works for Copy and Paste. But somehow does not limit to only the filtered rows when using Cut and Paste. As a workaround one can Copy, Paste and then delete the values of the filtered rows. – Arjan Jan 9 '15 at 9:42

I've found that setting a filter in Google Spreadsheets, copying that filtered selection, and then pasting into Excel does only paste the filtered selection. When you try to paste into another Google Spreadsheet, you get all rows in the selection (regardless of filter).

share|improve this answer

The best way to do this is to just select the cells you want to save as CSV, paste it into notepad, then find/replace tab with a comma.

share|improve this answer

Open a Gdocs spreadsheet, look at the menu item: 'Tools::Script Gallery', do a search for csv, and you'll find a script that takes an arbitrary named range, converts it to to csv and emails the result to you. I can't vouch for the script at all, but it seems to work.

If you look at it in the Gdocs Script Editor, you can see that it builds a CSV by actually parsing the spreadsheet data rather than using an internal export function, so it may not work perfectly for all cases. If it doesn't do what you want out of the box, it looks like this would be pretty easy to modify. I haven't tried it on filtered data, but it gets its data from a call to 'SpreadsheetApp.getActiveSpreadsheet()' which has a '.getActiveSelection()' method, so you might be able to bypass the whole named range thing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.