File Sharing Problems

How to Embed or Attach a File in an Excel Cell

Maira MehtabMaira Mehtab Nov 10, 2026 870 views

Question details

The user wants to know how to store, embed, or attach an external file directly inside a single Excel cell.

How to Embed or Attach a File in an Excel Cell
Product
Microsoft Excel
Device & OS
not provided
Scenario
Organizing files, references, or external documents cleanly within an Excel spreadsheet.
Observed behavior
Excel does not allow storing an entire external file directly inside cell text like a URL, requiring alternative methods such as hyperlinks or OLE objects to link or attach files.
Before you start

Ensure you know the exact file path for the document you want to attach and verify that the file will remain in that location if you are creating a link.

Solution 1Recommended

Use the HYPERLINK Function or Insert Hyperlink Tool

The cleanest way to link an external file to a specific cell without bloating your workbook size.

Hyperlinking is highly recommended for keeping your spreadsheet lightweight and organized. It creates a clickable text link that opens the target file on your computer.

1
Select the target cell

Click on the cell where you want the file link to appear.

2
Open Insert Hyperlink dialog

Press Ctrl + K on your keyboard to open the Insert Hyperlink window.

3
Select your file

Choose 'Existing File or Web Page' on the left panel, browse to select your file, type a friendly name in the 'Text to display' box, and click OK.

4
Alternative: Use the formula bar

You can also type =HYPERLINK("C:\Path\To\Your\File.txt", "Friendly Name") directly into the cell and press Enter.

Use the HYPERLINK Function or Insert Hyperlink Tool
Best Practice: Using hyperlinks keeps your Excel file size small while providing immediate, seamless access to relevant external documents.

Easily Attach and Link Files with WPS Spreadsheet

WPS Office provides a fully compatible, lightweight, and free alternative to manage your spreadsheets. You can effortlessly embed objects, create hyperlinks, and organize your data just as you would in Microsoft Excel.

  1. 1. Open your file in WPS Office: Launch WPS Spreadsheet and open the document where you want to attach a file.
  2. 2. Navigate to the Insert menu: Select the target cell and click on the 'Insert' tab located on the top ribbon.
  3. 3. Choose your attachment method: Click 'Hyperlink' to link an external file path, or select 'Object' to embed the file directly into your workbook.
  4. 4. Finalize and save: Customize the display text or check 'Display as icon' for objects, click 'OK', and save your spreadsheet.
100% compatible with Microsoft Excel (.xlsx, .xls) formatsLightweight application that runs smoothly even on older devicesSeamlessly insert OLE objects, file attachments, and hyperlinksFree to use with a highly familiar, easy-to-navigate tabbed interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does my embedded object look distorted or oversized in the cell?

Embedded objects float over cells rather than sitting strictly inside the cell text. To align them better, resize the icon using its corner handles, then right-click the object, select 'Format Object', go to the Properties tab, and choose 'Move and size with cells'.

Will my hyperlinks break if I email the Excel file to someone else?

Yes. If the hyperlink points to a local file path on your hard drive (e.g., C:\Documents\file.pdf), the recipient will not be able to open it because the file doesn't exist on their computer. If you need to share the file, embed it as an Object instead.

Can I attach a PDF file to an Excel cell?

Yes, you can attach a PDF by navigating to Insert > Object, selecting the 'Create from File' tab, browsing for your PDF, and checking the 'Display as icon' box before clicking OK.

How do I open a file automatically when a cell is clicked without using the HYPERLINK function?

You can achieve this using a VBA Macro. Write a script using the 'ThisWorkbook.FollowHyperlink Address:=filePath' command and assign it to the cell. Note that you must save your workbook as a Macro-Enabled Workbook (.xlsm) for the code to run.