.netexceloffice-jsjavascript-api-for-office

Get bindings created through the Excel JavaScript API for Office from an Excel file


It is possible to create 'bindings' in an Excel file using the JavaScript API for Office. This allows Excel add-ins to 'name' parts of the data for later access. These bindings survive if the user renames elements, or moves them between worksheets.

Bindings in the JavaScript API for Office

Does anyone know of a way of getting the bindings out of a saved Excel file, when running outside the context of an Office add-in? Ideally a .NET library.

I've looked at Aspose Cells, Synfusion XlsIO, Closed XML and EPPPlus, which don't seem to support this. The Open Office XML SDK may support it, but it's very low-level and I'm not sure how to get at the bindings.

Any hints much appreciated.

Thanks


Solution

  • If the document is stored on OneDrive or SharePoint you could access the Bindings Collection (https://github.com/OfficeDev/office-js-docs/blob/ExcelJs_1.2_OpenSpec/excel/resources/bindingcollection.md) via the Microsoft Graph (https://graph.microsoft.io/en-us/) via REST.