Passing Data to Google Sheets Directly from a Report

  • 0
  • 1
  • Question
  • Updated 4 months ago
  • Answered

Anyone have any experience using the ImportHTML() function in google sheets? I'm simply trying to import a summary table into a google sheet using the ImportHTML() google sheets function. The arguments of the function are as follows:

ImportHTML("url", "table" or "list", index)

I'm wondering if you have to include an app token in the url, as google sheets is obviously outside our quickbase domain. I've tried passing the token and not, both of which were unsuccessful. Any guidance would be appreciated.

Many thanks

Photo of Brian

Brian

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
Google would be executing ImportHTML fetch of the URL from its server (not your browser). Since Google does not have a valid ticket the request will not return your report data and the spreadsheet cell will not fill. Even if the request was successful ImportHTML requires you identify which table to extract (there are four dozen tables in a simple report page) and place in the formula's cell and you will be hard pressed to identify which table your data is in (and its position will likely change as QuickBase tweaks their page layout).

You are more likely to have success using ImportXML or ImportData but you still have the ticket issue to deal with. If you want to pursue this I would suggest you first import public CSV or XML data from a QuickBase URL. Next tackle the ticket issue or devise a scheme where the data you want to import or proxied through a server or service which you have access control to.
Photo of Joel

Joel

  • 0 Points
If you are comfortable doing a bit of coding in Javascript you can use the Google Apps Script UrlFetchApp.fetch() method to connect to the Quickbooks API and get the data and then push it into a spreadsheet.  I don't have a ton of experience with this yet, but I have completed a basic proof of concept.
Photo of Carlos

Carlos

  • 796 Points 500 badge 2x thumb
Hi Joel,
would you care sharing your code here?
I'm attempting something similar with little/no experience in GScript.

thanks