Dear Shaun Pendrigh
Thank you for posting your question on the Q&A forum regarding reading cells from another workbook using the Excel JavaScript API.
Based on my research, your interpretation appears to be accurate. According to Work with workbooks using the Excel JavaScript API: “The Workbook object is the entry point for your add-in to interact with Excel. It maintains collections of worksheets, tables, PivotTables, and more, through which Excel data is accessed and changed.” This means the Workbook object is the root for all operations and only contains data for the current workbook where the add-in is running.
Additionally, in the Excel.Workbook class documentation, the first sentence states: “Workbook is the top level object which contains related workbook objects such as worksheets, tables, and ranges.” This reinforces that all Office.js operations are limited to the current workbook context.
For further background, you can also review Privacy and security for Office Add-ins. This document explains the security architecture and sandbox environment for add-ins. Even when running on Excel desktop, your add-in code is web-based (HTML, CSS, JavaScript) and executes inside an iframe sandbox. Due to modern browser security standards and the Same-Origin Policy, JavaScript running in a sandboxed iframe cannot access the local file system. This is a fundamental security mechanism to prevent malicious web pages from reading user data.
Therefore, when Microsoft states that add-ins run in a sandboxed iframe, they are implicitly confirming that these security rules apply, including the restriction on accessing local files or other open workbooks directly.
In addition, you may check this helpful resource: Browsers and webview controls used by Office Add-ins, which provides more insight into how Office Add-ins use an embedded browser control.
If you need to work with data from another workbook, you might consider alternatives such as:
- Microsoft Graph Excel REST API for files stored in OneDrive or SharePoint.
- Office Scripts + Power Automate to orchestrate data transfer between workbooks.
- Linked workbook formulas (e.g., =[Other.xlsx]Sheet1!A1) for native Excel linking.
Hope this information is helpful.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.