I am loading a list into a google sheet tab SheetA then amending the data cell by cell into the same google sheet in a different tab SheetB with some manipulation as it goes over.
But the only way I know how to do it is activate the sheet each time and its really slow. Is there a way to move the data without having to physically activate the sheet. So for eaxmple grap the value of cell A1 from SheetA without ever deactivating SheetB?
Here is a sample of the section of code where you can see it activating the sheets back and forth. I used to do a similar function in Excel but in Excel I didn't have to activate the sheets and I could turn off the visual during runtime which made the whole transfer quite fast.
Can you do the same in google sheets? If so what is the syntax?
while (SpreadsheetApp.getActiveSheet().getRange('A'+ COUNTERSheetA).getValue() != ""){
VALUEA = SpreadsheetApp.getActiveSheet().getRange('A'+ COUNTERSheetA).getValue()
VALUEB = SpreadsheetApp.getActiveSheet().getRange('B'+ COUNTERA).getValue()
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('SheetA'), true);
spreadsheet.getRange('A'+COUNTERSheetB).activate();
spreadsheet.getCurrentCell().setValue(VALUEA);
spreadsheet.getRange('B'+COUNTERSheetB).activate();
spreadsheet.getCurrentCell().setValue(VALUEB);
COUNTERSheetB = COUNTERSheetB + 1
COUNTERSheetA = COUNTERSheetA + 1
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('SheetA'), true);
}