Reputation: 11
The recorded macro looks like this:
function Unhide() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('A:P').activate();
spreadsheet.getActiveSheet().showColumns(0, 16);
};
When trying to execute the macro it stops and shows the following error message:
Exception: Those columns are out of bounds
Upvotes: 1
Views: 387
Reputation: 81
Try switching your starting index of showColumns() to 1.
function Unhide() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('A:P').activate();
spreadsheet.getActiveSheet().showColumns(1, 16);
};
Upvotes: 2