Excel Workbook ID: What It Means and How to Find It

How-to basics · Updated November 18, 2026

An Excel workbook has no universal ID displayed in the Excel app. When someone asks for an “Excel workbook ID,” they usually mean the file’s identifier in OneDrive or SharePoint, or the identifier expected by a connector or API; the right value depends on where the workbook is stored and what you are using it for.

What an Excel workbook ID means

A workbook is an Excel file, typically saved as an .xlsx or .xlsm file. Excel does not add a single, built-in “workbook ID” that works everywhere. Instead, services that store or work with the file may assign their own identifiers. In Microsoft 365 automation and development, the most common meaning is the file’s drive item ID in OneDrive or SharePoint.

That ID identifies the stored file within its storage context. It is different from the workbook’s name, its location, the name of a worksheet, and the text in a cell. For example, “Quarterly Sales.xlsx” is a filename, while an ID returned by Microsoft Graph is a service-generated identifier. The two values serve different purposes: names and paths help people recognize files, while IDs help software refer to a particular stored item.

The phrase can also mean something else in a particular app or workflow. A Power Automate action may ask you to select a file or provide an identifier; an API example may call for a drive item ID; an organization’s own database may assign its own record number. Check the exact field label and the service documentation before assuming these identifiers are interchangeable.

Where Excel keeps workbook identity

In Excel for Microsoft 365 on Windows, the workbook window and File tab show useful details such as the filename and, for a saved file, its location. They do not normally show a universal workbook ID. To check where a file is stored, open it and look at its name and location in the title area, or use File > Info. The exact details shown can vary with the storage service and your organization’s setup.

A file saved only on your computer has a local path, such as a folder and filename. That path can locate the file on that computer, but it is not a globally unique ID: another computer may have a different folder structure, and two people can have files with the same name. If you upload the file to OneDrive or SharePoint, the service can provide a cloud item identifier for its stored copy.

Excel for the web also does not present a general-purpose workbook ID as a normal workbook property. A file opened from OneDrive or SharePoint is associated with the storage service’s item. The service or an application using its API can retrieve that identifier, even though it is not part of the workbook’s visible sheet content.

How to find the ID in OneDrive or SharePoint

For most Microsoft 365 automation tasks, the relevant identifier belongs to the file in OneDrive or SharePoint, rather than to Excel itself. If a workflow already uses a Microsoft connector, choose the workbook using the connector’s file picker where possible. The connector can supply the reference it expects and helps avoid copying a link or name into a field that requires an ID.

  1. Identify the storage location. Check whether the workbook is in OneDrive, a SharePoint document library, or only on your computer. A synced SharePoint folder on your computer is still backed by SharePoint, but a separate local copy may not be.
  2. Check the field asking for the value. Read the action or API documentation. It may want a file identifier, a path, a sharing link, a drive ID, or a site and list item combination. These are not automatically equivalent.
  3. Use the service’s file picker or metadata action. In Power Automate, select the workbook in the relevant Excel Online (Business) action, or use a suitable OneDrive for Business or SharePoint action to retrieve file metadata. Pass the returned identifier onward when the next action asks for that identifier.
  4. For custom code, retrieve the item through Microsoft Graph. A Graph response for a drive item includes an id property. Use the value returned for the workbook in the correct drive, rather than guessing an ID from the filename.

A regular “Copy link” sharing URL is not necessarily the same thing as a drive item ID. It can contain encoded sharing information or a link token, and a service may require that link to be resolved before it can identify the underlying file. Do not remove parts of a URL or treat its visible text as the ID unless the relevant documentation says to do so.

Workbook ID, file name, path, and link compared

These terms are often mixed up, but each points to the file in a different way. Knowing which one a tool requests prevents errors such as passing a display name where an opaque service identifier is required.

  • Filename: The human-readable name, such as Budget.xlsx. It may not be unique; several folders can contain a file with that name.
  • Path: A location expressed through folders and a filename. It can be useful for locating a file, but the path changes if the file is moved or folders are renamed.
  • Drive item ID: An identifier returned by OneDrive or SharePoint APIs for a stored item. It is not intended to be interpreted as a filename or edited by hand.
  • Drive ID: An identifier for the storage drive or library, not the workbook itself. Some API operations need both the drive and item context.
  • Sharing link: A URL used to access or share a file. It may have permission or link behavior attached and is not automatically the item ID.
  • SharePoint list item ID: A list-level number associated with a document library item. It is distinct from the drive item ID, even when both relate to the same document.

For example, a SharePoint document could be named Budget.xlsx, have a library path under a finance folder, have a Graph drive item ID, and have a numeric list item ID. Those values can all refer to the same document, but a particular action usually accepts only the kind it specifies.

What happens when a workbook is moved or renamed

A rename changes the filename, and moving a file changes its location. An ID-based reference can be more robust than a hard-coded path when the file remains in the same storage context. However, do not assume that an ID is permanent across every operation or storage boundary. Moving a file between drives, libraries, or sites can affect its identity and may require an application or workflow to look it up again.

Sharing permissions matter too. Having an item ID does not by itself grant access to the workbook. The account or application using the ID must still have permission to read or edit the file. If an API call fails after a move, check the current storage location, the identifier being used, and the permissions of the account making the request.

In practical workflows, selecting the file again through the connector or querying its current metadata is safer than assuming an old path or copied identifier still applies. This is especially important when a workbook is moved between a personal OneDrive and a team SharePoint site, because these are different storage contexts.

Common problems and misconceptions

  • Searching inside the workbook: A workbook ID is not usually stored in a worksheet cell or displayed as a standard Excel property. Searching the grid for “ID” will not reveal the cloud file identifier unless someone deliberately put a value there.
  • Using the filename as the ID: A filename may work in a field that asks for a name, but it is not a safe substitute for a unique file identifier.
  • Copying the whole sharing URL: A connector that expects a file ID may reject a sharing link. Use the file picker, or follow the connector’s instructions for resolving a link.
  • Confusing workbook and worksheet: A workbook is the file; a worksheet is one tab within it. A worksheet name such as “Summary” is not a workbook ID.
  • Assuming every ID works everywhere: A Graph drive item ID, a SharePoint list item ID, and a custom application’s record ID belong to different systems. Verify the exact identifier type requested.

If a workflow reports that it cannot find a file, first confirm that it points to the right OneDrive account or SharePoint site. Then confirm that the file still exists at the expected location, that the signed-in connection has permission, and that the action received the right kind of reference. These checks usually narrow the problem more effectively than changing the workbook’s name.

Using workbook identifiers in automation and code

Power Automate users commonly select a workbook in an Excel Online (Business) action, then pass the chosen file reference between steps. The interface and available dynamic content depend on the action and connector. If an action explicitly asks for an identifier, use the corresponding identifier output from a file metadata step; do not substitute the workbook’s display name unless the field specifically asks for a name.

For custom integrations, Microsoft Graph represents Excel workbooks as files stored in OneDrive or SharePoint. An application typically identifies the drive item and then calls workbook-related operations on it. The API’s authentication and permissions must be configured, and the caller needs access to the item. A workbook ID alone does not contain the workbook’s data and is not a secret key or password.

VBA inside desktop Excel is a separate case. The ThisWorkbook object refers to the workbook containing the running macro, but it is an object reference within Excel, not a cloud drive item ID that can be exchanged with Graph or Power Automate. Similarly, workbook names and paths available to VBA describe the open file, not a universal identifier across storage services.

Frequently Asked Questions

Does every Excel workbook have a unique ID?
Not one universal ID that Excel displays and every service accepts. A cloud storage service can assign an item identifier to its copy, while a local workbook may be known only by its path and filename in that environment.

How do I find my Excel workbook ID in Excel?
Excel for Microsoft 365 on Windows does not normally show a general workbook ID in the ribbon or File > Info. Use the OneDrive or SharePoint connector, file metadata, or an API that returns the stored file’s identifier.

Is an Excel workbook ID the same as its file name?
No. A filename is readable and can be duplicated. A service-generated item ID is a separate reference used to identify a stored file in that service.

Is the workbook ID the same as the sharing link?
Usually not. A sharing link is a URL that may encode sharing or access information. A connector or API may accept a link in a specific workflow, but it should not be assumed to be the drive item ID.

Can I use the same workbook ID after moving the file?
It depends on the storage service and the move. References may remain useful within a storage context, but moves between drives, libraries, or sites can change how the item is identified. Retrieve the current metadata if a reference stops working.

What should I enter when Power Automate asks for a workbook?
Use the file picker when available, and make sure you select the workbook from the correct OneDrive or SharePoint location. If the action asks for a specific identifier field, supply the matching identifier from the connector or metadata step, not a guessed filename or URL.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.