Closed achang0406 closed 5 years ago
Does binding object help in this case? Binding has unique ID exposed in the API (https://github.com/OfficeDev/office-js-docs/blob/ExcelJs_OpenSpec/reference/excel/binding.md).
We are having trouble seeing how the binding object is able to provide a unique immutable (unchangeable) ID for a defined name object that is independent from the cell range and the name of the defined name.
The binding object seem to provide a way to tie event listeners and attributes to a group of cells or individual cells but does not actually add attributes to the defined name object.
There is currently no reliable way to uniquely identify a defined name.
We are currently juggling with a few workarounds.
workarounds
#1 use worksheet + cell range to uniquely identify a defined name for example:
risks There can be multiple defined names in the exact same worksheet + cell range.
#2 use the name of a defined name for its ID
risks the name of defined names can be renamed which makes it not unique. Client side will have to somehow detect the change and edit all corresponding defined name which is an open issue, https://github.com/OfficeDev/office-js-docs/issues/1507.
Proposed Solution
Excel generates a unique ID when a defined name is created. The ID will be independent from the path of the cell range and the name of the defined name. Then this ID would be accessible from an API or the defined name object.