I need to copy paste a range from template sheet file to current working sheet file. I understand from the below code, that is not possible.
Is it possible to achive this using Sheets API advanced service?
I actually need to copy paste cell widths, formatting, mergedcells etc from template file range to current file
I have tried with
function copyToMySheetFromTemplateFileRange()
{
var ss = SpreadsheetApp.getActiveSpreadsheet()
var sheet = ss.getActiveSheet();
var tss = SpreadsheetApp.openById(ID_OF_TEMPLATE_SPREADSHEET);
var tsheet = tss.getSheetByName("SHEET_A")
tsheet.getRange(1, 1, sheet.getMaxRows(), sheet.getMaxColumns())
var newSheet = ss.insertSheet(1);
newSheet.getRange(2, 1).activate();
tsheet.getDataRange().copyTo(newSheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
}