I have a table of data in a sheet that contains 7 columns of data. I would like to take only the first 5 columns of data from that table and populate it into another sheet. However, when I run my code it populates all 7 columns into the other sheet, which I don't want. How can I correct this? A portion of my script is below.
//Section D: Setting filter criteria based on dates in Data Overview sheet.
var filteredData = rngData.filter(function(row)
{var date = row[0]; return date >= beginDate_current && date <= endDate_current});
//Section E: Setting filtered data into Current Month table in Summarized Data sheet.
sheet3.getRange("B7").getDataRegion().offset(6,0).clearContent();
sheet3.getRange(7,3,filteredData.length,filteredData[5].length).setValues(filteredData);
sheet3.getRange(7,3,filteredData.length,filteredData[5].length).sort([{column: 3, ascending:
true}]);
debugger
}