Office Compatibility Issues

Display an Excel Workbook’s File Location in Excel for the Web

Huda QurayshiHuda Qurayshi Nov 18, 2026 870 views

Question details

The user needs to display an Excel workbook’s file location while using Excel for the web.

Display an Excel Workbook’s File Location in Excel for the Web
Product
Excel for the web and Office Scripts
Device & OS
not provided
Scenario
The workbook is stored online, and the user wants its location available inside the workbook.
Observed behavior
CELL("filename",A1) does not provide the same path information in Excel for the web as in desktop Excel, and workbook.getName() returns only the workbook name and extension.
Before you start

Locate the workbook in OneDrive or SharePoint and confirm that you can open it. If you plan to use a desktop formula, make sure the workbook has been saved.

Solution 1Recommended

Copy the OneDrive or SharePoint link into the workbook

Use this method to make a workbook link available in Excel for the web.

1
Find the workbook

Open OneDrive or the SharePoint document library and locate the workbook.

2
Copy its link

Select the workbook, choose Share or Copy link, review the link access settings, and copy the link.

3
Paste the link

Open the workbook in Excel for the web, select a cell, and paste the copied link. Optionally, label an adjacent cell so others know what the link is for.

Copy the OneDrive or SharePoint link into the workbook
Link versus file path: A copied sharing link may not be the workbook’s exact document URL or a local file path. Link access depends on the permissions you select, and the stored link may need updating if the file is moved.
Free Microsoft Office alternative

Work with Excel Workbooks in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files and move between office tools easily, though WPS does not change Excel for the web’s path limitations.

Open and edit spreadsheets in a familiar interfaceCompatible with Microsoft Excel formats, including XLSXAdd a workbook link to a cell for easy referenceFree and lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn’t CELL("filename",A1) show the path in Excel for the web?

Excel for the web does not provide the same workbook path information through CELL as desktop Excel. Use a copied OneDrive or SharePoint link in a cell, or open the saved workbook in desktop Excel.

Can an Office Script get the workbook’s full URL with getName()?

No. workbook.getName() returns the workbook name and extension, not its full document URL. Copy the link from OneDrive or SharePoint if you need to store it in the workbook.

Does a copied sharing link show the exact file path?

Not necessarily. A link copied through Share or Copy link may be a sharing URL rather than the exact document URL or a local path. Check its access settings before sharing it.

Why is CELL("filename",A1) empty in desktop Excel?

The workbook must be saved before the formula can return its location. Choose File > Save or Save As, then check the formula again.