0

I've been trying to use importXML in Google Sheets to import specific data (in this case, only player name) from several players via the Steam Web API.

I encountered what seems to be a limit with the number of importXML calls I can make in my sheet, because I get loading errors:

Loading data may take a while because of the large number of requests. Try to reduce the amount of IMPORTHTML, IMPORTDATA, IMPORTFEED or IMPORTXML functions across spreadsheets you've created.

This list will likely grow (currently at about 170) and I need a way for it to be able to handle the calls. I don't need the data to update very frequently (even 2-3 times a day is sufficient).

I've tried the code I found from another SO post, but that seems to refresh all the importxml calls at once, so I still got loading errors.

From what I've researched so far, it seems like I'll need to use an Apps Script to optimize my sheet by creating intervals for the calls. Is there a way I could have a script do the following:

  1. Call 25 rows (or whichever limit is optimal)
  2. Wait some amount of time
  3. Call next 25 rows
  4. Continue till the end of the sheet, then restart loop

I'm not too savvy with writing functions so don't know how to edit the code to achieve that. Any help would be appreciated.

If you'd like to take a look at the spreadsheet I'm working with, here it is. For now, only Column B has the importXML calls and the url's are concatenated using cells in Column H. So there's one importXML call per row.

Aquinox
  • 1
  • 1
  • Welcome to [so]. While a link to an external resource might be helpful, questions on this site should be self-contained. If the linked spreadsheet is really necessary, please add a brief descripition of the spreadsheet structure and its relevant parts directly into the question body. Regarding the "loading errors" add the textual error messages. Regarding the script, show what you have tried. Avoid including phrases that makes the looks to be asking for recommendations as this type of question are off-topic. – Rubén Jan 23 '23 at 17:08
  • Hi Rubén, sorry for the mistakes. I made some edits as per your suggestions (thank you). I kept the link in there just in case (if someone needs it to help me?) and included a little description. – Aquinox Jan 23 '23 at 22:45
  • It's fine to keep the link. The point is to not force readers to follow the link to understand the question, and to keep the question clear for future readers. Regarding not knowing how to edit the script... you will have more chances that your question be well received if you show your atttempt to adapt the script to your specific needs and makes your question more specific about a writing code. – Rubén Jan 23 '23 at 22:53

0 Answers0