Link to home
Start Free TrialLog in
Avatar of Doug Van
Doug VanFlag for Canada

asked on

Exporting only the Google Sheets filtered view to .csv?

Hello all,

In this sheet, see tab "Final Export", I am filtering out all the cells with "skip" with the intention of exporting the resulting rows as a .csv file.

Unfortunately, there doesn't seem to by any way of saving/exporting only the filtered view, that is, only the rows without the "skip" in the cells. :(
When I attempt to export, the .csv file also includes all the "skip" rows. :(

Is there another way I can show and export only the content from tab "Align set 1 and 2" that is designated with "yes" in the "Keep Target" D tab?

Thank you


Here is the sheet:
https://docs.google.com/spreadsheets/d/13hZ8cdOksyHh07FVftuWsWtwuKavrG2RC7134CLiwZ4/edit#gid=977037083

Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

If Google Sheets works the same as Excel, if you copy the filtered range you will get only the filtered values copied. You could then paste into a separate sheet and export that sheet.
Avatar of Doug Van

ASKER

Thanks for your reply Rob. Unfortunately no. When I copy/paste the filtered rows, all the hidden (filtered) content gets copied as well.

I was thinking that the solution might be to use a more clever line filtering function(s) so that I don't need to use the column filter.

Currently, I am doing a brute-force, "=IFS('Align set 1 and 2 '!$D3252<>"yes","skip",'Align set 1 and 2 '!$D3252="yes",('target'!A3251))". I am thinking that there is a better way to do this so that I don't need to fill the cells with "skip" and then use the filter tool to filter out "skip."

ASKER CERTIFIED SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, I did look at using the Filter function but I couldn't make it work across multiple tabs.
Update:
Yes... this does work...So cool! Thanks for reminding to look at that function again.

=Filter(target!$A1:I,'Align set 1 and 2'!$D2:D<>"yes")
Cool, glad it worked out.
Not exactly. On the sample sheet, it worked.

But I am getting "Error FILTER has mismatched range sizes. Expected row count: 3843. column count: 1. Actual row count: 5456, column count: 1." on my real data - it's almost identical to the sample sheet.

=Filter('Edited-en-fr'!$A1:I,'Compare 2 Sets'!$D3:D="yes")

What might I be doing wrong?
=Filter('Edited-en-fr'!$A1:I ?? ,'Compare 2 Sets'!$D3:D ?? ="yes")

Should there be row numbers in the range where I've put ??

And I would've thought the Filter Range and the Condition Range have to be on the same sheet.
Thanks Rob...
This is either bizarre or I am lacking some fundamental understanding of how the filter works.

On my real datasheet, I seem to need a value for the last row... but I can't seem to get it right.
When I enter:
=Filter('Edited-en-fr'!$A1:I3843 ,'Compare 2 Sets'!$D3:D3840 ="yes")  

FILTER has mismatched range sizes. Expected row count: 3843. column count: 1. Actual row count: 3838, column count: 1.

But if I change the value to 3838... okay, that worked. :)

But why must I specify the values, when I did not need to do that in my sample sheet?
=Filter(target!$A1:I,'Align set 1 and 2'!$D2:D<>"yes") - this worked perfectly.
A1:I3843  = 3843 rows
D3:D3840 = 3838 rows

Try
D3:D3845  to make it same number of rows as A1:I3843
I did get it to work, but I just curious as to why I must specify the number of rows when it wasn't necessary in my example sheet.
https://docs.google.com/spreadsheets/d/13hZ8cdOksyHh07FVftuWsWtwuKavrG2RC7134CLiwZ4/edit#gid=977037083

This need to specify the row values is going to cause some difficulty because the dataset will frequently change. :( 
Sorry, don't know enough about Google sheets to be able to say.