Thanks so much for this! Dumb question, but wouldn't I have to edit the code slightly so this would work on sheets saved on Google Drive?
@EamonnCottrellКүн бұрын
Yes, it would need to be altered for Apps Script. You'd put all the csv files in a folder on your google drive, get that folder ID and then use this apps script: function combineCSV() { const folderId = ''; // Replace with the folder ID where your CSVs are stored const folder = DriveApp.getFolderById(folderId); const files = folder.getFilesByType(MimeType.CSV); const ss = SpreadsheetApp.getActiveSpreadsheet(); while (files.hasNext()) { const file = files.next(); const csvData = Utilities.parseCsv(file.getBlob().getDataAsString()); const sheet = ss.insertSheet(file.getName()); sheet.getRange(1, 1, csvData.length, csvData[0].length).setValues(csvData); } }
@lizzybennet5726Күн бұрын
@EamonnCottrell Thanks so much! I have some knowledge of AppsScript. It's been a life saver at work.