I have a Google Sheet that runs some Apps Script server code to connect to an SQL server. I want to show the message \"loading...\" in the modal dialog while data is being
//show dialog
var output = HtmlService.createHtmlOutput('Please wait...');
SpreadsheetApp.getUi().showModalDialog(output, 'Saving...');
some code
//close dialog
var output = HtmlService.createHtmlOutput('');
SpreadsheetApp.getUi().showModalDialog(output, 'Loading...');
*optional
ui.alert("Saved Successfully!")