Resource at URL contents exceeded maximum size

3,108 views
Skip to first unread message

Wolfgang Frey

unread,
Feb 24, 2023, 10:31:02 AM2/24/23
to Google Apps Script Community
I want to import some data from a sheet tab, published in html format,  (https://docs.google.com/spreadsheets/d/e/2PACX-...-z4/pubhtml/sheet?&gid=65...5  ) . The specific tab has around 7000 Rows and 8 columns. 

However whatever I try to import the data, either as CSV with 
=IMPORTDATA("https://docs.google.com/spreadsheets/d/e/2PACX-...-z4/pub?&ouput=csv&gid=65...5",","
or with 

I always get "Resource at URL contents exceeded maximum size". 
Is there a way to overcome this problem? using a different kind of import format? 
Or is there a way to query a subset of the data before the actual IMPORT...? 

Or is there a way to create a new Google Sheet in my Google drive with the information on that particular tab? 

many thanks in advance. 

Tanaike

unread,
Feb 24, 2023, 10:35:46 PM2/24/23
to Google Apps Script Community
In your situation, is this thread useful? https://stackoverflow.com/q/65917579

Wolfgang Frey

unread,
Feb 25, 2023, 11:50:45 AM2/25/23
to Google Apps Script Community
@Tanaike   thanks a lot. That really helped, that way I was able to retrieve the data in csv format and put it in a specific sheet / tab. 
Some follow up question please, assume that the CSV data has in column 6 the country and I just want to pull in data for a specific country, how could that be achived? 

Thanks again. 

Tanaike

unread,
Feb 25, 2023, 10:17:02 PM2/25/23
to Google Apps Script Community
Thank you for replying. About your 2nd question, I thought that the following threads in Stackoverflow might be useful for understanding your expected result.

https://stackoverflow.com/q/73743711
https://stackoverflow.com/q/67718384

As a simple example script, when `array` is an array converted from CSV data, it is as follows.

const res = array.filter(r => r[5] == "### your expected value ###").

Wolfgang Frey

unread,
Feb 28, 2023, 2:19:48 PM2/28/23
to Google Apps Script Community
Great - got it successfully working.  Many many thanks. Very much appreciated. 

Tanaike

unread,
Mar 1, 2023, 2:01:58 AM3/1/23
to Google Apps Script Community
Thank you for replying. I'm glad your issue was resolved.
Reply all
Reply to author
Forward
0 new messages