I've got a script that's importing a CSV from a location on G-Drive - I just need it to import the first 300 rows, as opposed to all 2000 rows. What am I missing?
function importCSVFromGoogleDrive() {
var fSource = DriveApp.getFolderById('xxxxxxxxxxxx'); // reports_folder_id = id of folder where csv is saved
var file = DriveApp.getFilesByName("content.csv").next();
var csvData = Utilities.parseCsv(file.getBlob().getDataAsString());
var sheet = SpreadsheetApp.getActiveSheet();
sheet.getRange(1, 1, csvData.length, csvData[0].length).setValues(csvData);
}