I am trying to fetch a gzip from a URL and import it automatically into a Google Spreadsheet.
The gzip contains one file of CSV data.
I know I can import the CSV data into a Google Spreadsheet but I would like to be able to cut out the step of me having to download the gzip and extract the file first before uploading it into a Google Spreadsheet.
So my queries, is it possible to import a gzipped CSV file from a URL directly into a Google Spreadsheet? If not, how would this be done with a Google Apps Script?
I was able to inflate (decompress) a gzipped file using a third party javascript library, pako. Here is the code:
There is an undocumented utility in GAS called unzip, I know it can unzip ordinary .zip files but have no idea if GNU zip are supported... maybe it's worth give it a try ? here is a quick test I wrote for a zip that was in my google documents/drive
Don't blame me if it doesn't work for you... it's just a proposal ;-)