Google Script to import CSV file from Google Drive to G Sheets when specific cell is edited
问题 I have a script in my G Sheets that imports a CSV from Google Drive and I have attached it to a clickable button within the workbook. It works great. Here is the script: function myFunction() { var file = DriveApp.getFilesByName("FileName.csv").next(); var csvData = Utilities.parseCsv(file.getBlob().getDataAsString()); var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Imported File"); sheet.getRange('A1:K10000').clearContent(); sheet.getRange(1, 1, csvData.length, csvData[0]