Exceeded maximum execution time for CSV upload

19 views
Skip to first unread message

Manikandan Murugesan

unread,
Jul 10, 2024, 1:06:00 AM (6 days ago) Jul 10
to Google Apps Script Community
Hi all,

i have facing an error on CSV upload to a google sheet

function importNewData(){
const folder = DriveApp.getFolderById('1b70YNXw_OLH1xMfy5yyd472uUkn_2tXr');
const fileName = '5.csv';
const file = folder.getFilesByName(fileName).next();

const dataBlob = file.getBlob();
let csvString = dataBlob.getDataAsString();
const csvData = Utilities.parseCsv(csvString);

const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheetByName('Sheet1')//change sheet name as needed

const range = sheet.getRange(1,1,csvData.length,csvData[0].length).setValues(csvData);

}


Error appeared : Exceeded maximum execution time

Total rows : 60216
total column : 115


is there any way, to speed up the execution or increase the time out or different code which can be executed without error

Thanks

Reply all
Reply to author
Forward
0 new messages