I have a Google sheet where I have placed a few buttons linking to the script. It works fine when I use it on the sheets page. But when I publish it and embed the sheet on my website, the button doesn't work. It's not performing. Below is the sample code I use to move from one sheet to another with the click of the button and the iframe code I am using.
function goToInward() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName("Inward"));
}
<iframe src="https://docs.google.com/spreadsheets/d/e/xxxxxxxxxxxxxxxxx/pubhtml?widget=true&headers=false" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:100%;width:100%;position:absolute;top:55px;left:0px;right:0px;bottom:0px" height="100%" width="100%"></iframe>