0
function importCSVFromGoogleDrive() {

  var file = DriveApp.getFilesByName("data.csv").next();
  var csvData = Utilities.parseCsv(file.getBlob().getDataAsString());
  var sheet = SpreadsheetApp.getActiveSheet();
  var range = sheet.getRange(csvData);

   var counter_r= csvData.getRow();
   var counter_c= csvData.getColoumn();


  var range = s.getRange("C3:H26");

   {
     (sheet.getRange(1, 1, csvData.length, csvData[0].length).setValues(csvData)) // specifies the row & column as the  sheet position to be inserted
   }   
}

Over here in my code I get an error saying Range not found. I know that there needs to be an array but I don't know how to write the code to implement that array. Can someone please explain this to me please?

I tried using this but it didn't work as well. Cannot Find Function 'getRange' in Google Script

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.