In Excel: use Insert ▸ Text ▸ Object ▸ Create from File, tick Display as icon to attach it, or tick Link to file to keep it in sync with the original.
On this page7
Click the cell where the icon should sit — the object anchors to the cell under its top-left corner.
Open Insert ▸ Text ▸ Object and switch to the Create from File tab.
Browse to the file, then decide: leave both boxes clear to embed the content visibly, tick Display as icon to attach it compactly, tick Link to file to store a pointer instead of a copy.
Right-click the object ▸ Format Object ▸ Properties and choose Move and size with cells so it follows its row.
Double-click the icon at any time to open the attachment in its own application.
What this does
Insert ▸ Object stores another document inside the workbook as an OLE object. Embedded, the whole file is copied in, so the workbook is self-contained and larger. Linked, only a path is stored, so the workbook stays small but the object shows nothing once the source moves. Either way the object floats on the drawing layer and opens in its own application when double-clicked. Before you run it on a workbook other people depend on, try it on a copy or a few rows first. Undo only reaches back through the current session, so a quick trial run is the cheapest way to see exactly what will change before the file is saved and shared. For “attach file into excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. That is what makes a data step that keeps your analysis trustworthy useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
Each row of a contracts register needs the signed PDF beside it. Select the cell, Insert ▸ Object ▸ Create from File ▸ Browse, pick contract-2291.pdf, tick Display as icon, and change the icon caption to the contract number. The workbook grows by the size of the PDF and colleagues can open it without access to the shared drive. A register that points at its own evidence survives an audit; one that points at a network folder somebody reorganised does not. When the result is not what you expected, undo straight away rather than repairing it by hand — undo restores the sheet exactly, while manual fixes tend to leave small inconsistencies behind that surface later.
In Google Sheets
This is a command rather than a formula, so there is no syntax to carry over. Google Sheets arranges its commands in menus across the top instead of a ribbon, names some of them differently and does not have every Excel command — look for the equivalent in the Sheets menus or its help before assuming the steps match. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. Here is the takeaway for “attach file into excel”: follow the steps at the top, check the result on the sheet itself, and keep undo in mind while you experiment. Done once deliberately, it becomes something you do from memory in Excel rather than something you search for again.
Common mistakes
- Embedding a dozen large attachments and pushing the workbook past the size limit of the mail system it is sent through.
- Ticking Link to file with a local path such as C:\Users\… — every other person opening the workbook sees a broken object.
- Expecting embedded objects to open in Excel for the web or on a phone; they need the desktop application and the matching program.
- Leaving the default anchoring so the icon stays put when rows are inserted above it and ends up beside the wrong record.
Frequently asked questions
How do I attach a PDF to an Excel cell?
Insert ▸ Object ▸ Create from File ▸ Browse, select the PDF and tick Display as icon. Anchor it with Format Object ▸ Properties ▸ Move and size with cells.
What is the difference between embedding and linking?
Embedding copies the file into the workbook, which makes it portable but bigger. Linking stores only the path, which keeps the workbook small but breaks when the file moves.
Can I attach several files at once?
No. Insert ▸ Object handles one file per action, so repeat it per attachment.
Is a hyperlink not simpler?
Often yes. Ctrl+K stores a link with no size cost, but it only works while the reader can reach that location.