How to Retrieve Local and Web Paths of an Excel Workbook from OneDrive using JavaScript API
A OneDrive folder has been synchronized on a local machine, allowing workbooks to be opened directly from this folder. The local and web paths can be obtained using the Info => Copy path
and Info => Copy local path
options, as highlighted in the image below .
The challenge is retrieving both paths in an Excel add-in developed using the JavaScript API. The Office.context.document.url
property intermittently provides either the local path or the web path, but not both. Is there a method to obtain these paths from Excel using the JavaScript API, or are there any libraries, services, or hooks available to manipulate menu clicks to access this information, given that Excel already recognizes these paths?