I use this pattern ALL THE TIME when working with sheets. If you're just starting out it'll get you going. : GoogleAppsScript

PHOTO EMBED

Wed Mar 30 2022 23:45:13 GMT+0000 (Coordinated Universal Time)

Saved by @itsbrex #google #app #script

function myFunction() {
  let sheetData = SpreadsheetApp.getActiveSpreadsheet()
    .getSheetByName("Data")
    .getDataRange()
    .getValues();

  for (let i = 1; i < sheetData.length; i++) {
    Logger.log(sheetData[i][0]);
  }

  SpreadsheetApp.getActiveSpreadsheet()
    .getSheetByName("Data")
    .getDataRange()
    .setValues(sheetData);
}
content_copyCOPY

https://www.reddit.com/r/GoogleAppsScript/comments/hob5tn/issues_copying_csv_data_to_google_sheets/