Google Export

In addition to downloading the SQLite files, WebWidget data can be exported to Google Sheets. This enables a variety of use cases, such as creating graphs of the data generated by the widget. This works with in the following process:

  • User initiates the export from the Google Export page in the Widget Admin section
  • The Widgets server sends the user's widget data to a staging area on Google Drive
  • The user will have read-only access to this location
  • The user can use the IMPORTRANGE statement to pull data from the staging area into his/her Sheets

The Google Export process will show the user the required import command to be used. Here is an example of the output of the export process:

Running Google Export for username=dburfoot, widgetname=links
Found sheet ID 1INqfnCQQc4kOg1QTqYfA8U8NkLnRDykSGMO6TLaLD9M for dburfoot::links
608 cells updated for table link_main
For table link_main, use command:
     =IMPORTRANGE("1INqfnCQQc4kOg1QTqYfA8U8NkLnRDykSGMO6TLaLD9M", "link_main!A:Z")
64 cells updated for table link_categ
For table link_categ, use command:
     =IMPORTRANGE("1INqfnCQQc4kOg1QTqYfA8U8NkLnRDykSGMO6TLaLD9M", "link_categ!A:Z")
SUCCESS

All of the tables for a widget are sent to the same Google Sheet, with different subsheets for each table. The long sheet ID ("1INqfnCQQc4...") is globally unique and is stable over time, so every time a given user exports a given widget, it will be sent to the same Google Sheet.

To import the data for a given table, create a new Google Sheet and paste the IMPORTRANGE command into the top-left (A1) cell of the sheet.

If everything works, you should then see the Widget data from the given table flow into your Google Sheet:

You may see an error message saying that you need to connect the sheets. Simply click on the Allow Access button.

See this Google Support Page for more documentation on the IMPORTRANGE command.