You can get all range and remove the columns you don't need.
Addapted from Alex Wayne (Deleting a column from a multidimensional array in javascript)
var table = [
['a', 'b', '1', '5', '8'],
['c', 'd', '2', '6', '9'],
['f', 'g', '3', '7', '10']
];
var removeCol = function(arr, col1Index, col2Index) {
for (var i = 0; i < arr.length; i++) {
var row = arr[i];
row.splice(col1Index, 1);
row.splice(col2Index, 1);
}
}
// remove more than one column - can remove as many columns as needed
// ATENTION: spreadsheet column start in 1 and arrays start in 0
// start removing from last to first columns
removeCol(table, 4, 2);
alert(table);