Skip to content

Instantly share code, notes, and snippets.

@tomtaylor
Created April 23, 2020 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomtaylor/304e0505a042b610d642f9e6e2fec418 to your computer and use it in GitHub Desktop.
Save tomtaylor/304e0505a042b610d642f9e6e2fec418 to your computer and use it in GitHub Desktop.
Google Sheets macro to refresh all the data source sheets in the current file
/** @OnlyCurrentDoc */
function RefreshData() {
var spreadsheet = SpreadsheetApp.getActive();
SpreadsheetApp.enableAllDataSourcesExecution();
spreadsheet.getDataSourceTables().forEach(function(dataSourceTable) { dataSourceTable.refreshData() });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment