If I understand correctly, you have a single spreadsheet with two sheets, and you want to add a link in a cell in Sheet A that switches the active view to Sheet B.
I believe the function will solve your problem. The HYPERLINK you enter as first parameter to this function should be of the form url where "#gid=<sheet id>" is the sheet id for Sheet B. <sheet id>
You can find the gid for Sheet B by switching to the sheet in the browser window, and look for the term at the end of the URL. All Google Sheet URLs take the form gid=https://docs.google.com/spreadsheets/d/<spreadsheetId>/edit#gid=<sheetId>
No way to turn of that I know of. So annoying.
You can work-around using normal copy-paste, then a search-and-replace.
Apparently it is possible using a batchUpdate: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate
With one of the requests being of the form of: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#AddSheetRequest
For example, in order to add a new empty sheet with the name "FOO", one can send a batchUpdate like this one:
sheets.spreadsheets.batchUpdate(
{
auth: authClient,
spreadsheetId: spreadsheetId,
resource: {
requests: [
{
'addSheet':{
'properties':{
'title': 'FOO'
}
}
}
],
}
},
function(err, response) {
if (err) return callback('The API returned an error: ' + err);
console.log("success: ", response);
});