function getExcelData() {
const searchFolderId = "searchFolderId";
const mimeType = MimeType.MICROSOFT_EXCEL;
const filesFromFolder = DriveApp.getFolderById(searchFolderId).getFilesByType(mimeType);
let excelId = '';
while (filesFromFolder.hasNext()){
const file = filesFromFolder.next();
excelId = file.getId();
}
const excel = DriveApp.getFileById(excelId);
const tempFile = Drive.Files.insert(
{title: "TempFile", parents: [{"id": searchFolderId}]},
excel.getBlob(),
{convert: true}
);
const tempID = tempFile.getId();
const source = SpreadsheetApp.openById(tempID);
const sourceSheet = source.getSheetByName("sheetname");
const sourceValues = sourceSheet.getRange("A1:G20").getValues();
const target = SpreadsheetApp.getActiveSpreadsheet();
const targetSheet = target.getSheetByName("TargetSheetName");
targetSheet.getRange(targetSheet.getLastRow()+1, 1, sourceValues.length, sourceValues[0].length).setValues(sourceValues);
DriveApp.getFileById(tempID).setTrashed(true);
DriveApp.getFileById(excelId).setTrashed(true);
}