Hope you can help. Im looking to create a script to upload csv into a google sheet from a folder in the drive? is there a way to auto upload this once i have added to the folder?
thanks in advance
Hope you can help. Im looking to create a script to upload csv into a google sheet from a folder in the drive? is there a way to auto upload this once i have added to the folder?
thanks in advance
You can use Google Apps Script to create a google sheet version of your csv file in your Google Drive. You can use the script below:
function myFunction() {
var file = DriveApp.getFilesByName(your-filename-here).next();
var csvData = Utilities.parseCsv(file.getBlob().getDataAsString());
var sheet = SpreadsheetApp.getActiveSheet();
sheet.getRange(1,1,csvData.length, csvData[0].length).setValues(csvData)
}