const bakeSourceName = 'Dex';
const bakeDestinationName = 'Export';
function BakeExport() {
const ss = SpreadsheetApp.getActive();
const src = ss.getSheetByName(bakeSourceName);
const dst = ss.getSheetByName(bakeDestinationName) || ss.insertSheet(bakeDestinationName);
// Get full data range from source sheet
const lastRow = src.getLastRow();
const lastCol = src.getLastColumn();
// Get only evaluated values (not formulas)
const values = src.getRange(1, 1, lastRow, lastCol).getValues();
// Clear and overwrite Export sheet
dst.clearContents();
dst.getRange(1, 1, values.length, lastCol).setValues(values);
}
function onEdit(e) {
const sh = e.range.getSheet();
if (sh.getName() == bakeDestinationName) return;
BakeExport();
}