I've been working with entire Col rng's and noticed some inconsistencies.
For instance, my Excel Spreadsheet has a Col Rng of A1:A1048576
, but the following code fails.
var ws = context.workbook.worksheets.getActiveWorksheet();
var range = ws.getRange("A1:A1048576");
range.values = "A";
But, if I use the rng as "A1:A1048575"
(minus one), it works. Am I doing something wrong? The RNG doesn't appear to be 0 indexed as A1
selects the correct cell. I suspect this might be a bug, but wanted to confirm.
Here is the error FYI:
InvalidOperation: This operation is not permitted for the current object.
{
[functions]: ,
__proto__: {
[functions]: ,
__proto__: {
[functions]: ,
__proto__: {
[functions]: ,
__proto__: null
},
message: "",
name: "Error",
Symbol()_7.rurcc9qe7b1: undefined,
Symbol(nodejs.util.inspect.custom)_j.rurcc9qe7hi: undefined
},
message: "",
name: "Error",
Symbol()_7.rurcc9qe7b1: undefined,
Symbol(nodejs.util.inspect.custom)_j.rurcc9qe7hi: undefined
},
code: "InvalidOperation",
data: undefined,
debugInfo: {
[functions]: ,
__proto__: { },
code: "InvalidOperation",
errorLocation: "Range.values",
fullStatements: [
0: "Please enable config.extendedErrorLogging to see full statements.",
length: 1
],
message: "This operation is not permitted for the current object.",
statement: "range.values = ...;",
surroundingStatements: [
0: "var workbook = context.workbook;",
1: "var worksheets = workbook.worksheets;",
2: "var activeWorksheet = worksheets.getActiveWorksheet();",
3: "var range = activeWorksheet.getRange(...);",
4: "// Instantiate {range}",
5: "// >>>>>",
6: "range.values = ...;",
7: "// <<<<<",
length: 8
],
Symbol()_7.rurcc9qe7b1: undefined,
Symbol(nodejs.util.inspect.custom)_j.rurcc9qe7hi: undefined
},
description: "This operation is not permitted for the current object.",
httpStatusCode: 400,
innerError: null,
message: "This operation is not permitted for the current object.",
name: "RichApi.Error",
stack: "InvalidOperation: This operation is not permitted for the current object.
at Anonymous function (https://appsforoffice.microsoft.com/lib/beta/hosted/excel-win32-16.01.js:26:305431)
at Anonymous function (http://localhost:3000/yo/dist/polyfill.js:1:76119)
at e (http://localhost:3000/yo/dist/polyfill.js:1:31843)",
Symbol()_7.rurcc9qe7b1: undefined,
Symbol(nodejs.util.inspect.custom)_j.rurcc9qe7hi: undefined,
traceMessages: [
length: 0
]
}