Posted 10 January 2018, 2:07 am EST
Hi!
I’m using the spreadjs version 10.2.0 and I’m having an issue when I create a custom name with multi ranges associated.
The issue that I have is when I try to get the custom name and the range associated to this custom name I don’t have the information to do that.
Sample that works:
I created a name ‘name_sample’ with that formula ‘Sheet1!$N$9’. When I get the custom name from the workbook (spreadsheet.workbook.getCustomName(‘name_sample’)) I’m getting as result an object [NameInfo] and over that object I can get the expression, formula, range, etc. and the expression type is reference (1).
Sample that doesn’t work:
I created a name ‘name_multi_range’ with the formula ‘Sheet1!$B$2:$F$13,Sheet1!$H$2:$L$13’. When I get the custom name from the workbook (spreadsheet.workbook.getCustomName(‘name_multi_range’)) I’m getting as result an object [NameInfo] but I can’t get ranges from that object and the expression type is operator (9). I’m getting this object:
a {type: 9, operatorType: 16, value: a, value2: a}
operatorType:16
type:9
value:a {type: 1, tf: ƒ, getRange: ƒ, offset: ƒ, offset2: ƒ, …}
value2:a {type: 1, tf: ƒ, getRange: ƒ, offset: ƒ, offset2: ƒ, …}
proto:Object
I can search the range into the properties value and value2 but If I have more than 3 ranges associated to that custom name I need to make something recursive.
I want to know if exist other way to get the ranges from that object.
Thanks in advance.