To use AI in Excel today you have three honest options: Microsoft 365 Copilot inside Excel, a free web widget that generates one formula at a time, or a desktop AI agent that opens your workbook on your own machine and edits it in place. Each one fits a different job and trust model — Copilot is best for in-flow chat help on cloud-stored sheets, widgets are best for a single formula you can paste, and a desktop agent is best when the workbook must remain stored locally and the work spans many steps or files. Lapu AI still sends relevant context to hosted models for reasoning. This guide covers the tasks each option handles well and where it breaks down.
The conversation about "AI in Excel" usually starts and stops at Microsoft 365 Copilot, because that is the option Microsoft markets directly inside the app. Copilot is a strong product. It is also not the only option, and on machines where the workbook is sensitive or where the work spans more than one file, it is often the wrong option.
How do I use AI in Excel?
You have three options. Inside Excel, Microsoft 365 Copilot adds a chat pane that drafts formulas, summarizes data, and builds charts — it needs an M365 Copilot license and the file on OneDrive with AutoSave on. Web widgets like Formula Bot generate one formula from a prompt. A desktop AI agent opens the .xlsx on your disk and runs multi-step work locally, with a permission gate on every write.
The third option is the one most "how to use AI in Excel" guides skip. It is also the closest analog to the way a junior analyst would work for you: read the file, do the work, save the file, and check in when something is unclear.
Can AI read Excel files locally without uploading them?
Yes, if “locally” describes where the workbook is stored and edited. Lapu AI loads the .xlsx from disk with a local library such as openpyxl and writes the result back locally. It does not store the workbook in a Lapu cloud workspace. Relevant cell values and instructions still pass through Lapu AI infrastructure to hosted model providers for reasoning. By contrast, Microsoft 365 Copilot in Excel requires the file itself to be saved on OneDrive with AutoSave enabled (Microsoft, 2026).
The architecture matters more than the model. If a tool requires the workbook to live on a cloud drive before it can read it, the file-storage boundary has already moved. A local-first desktop agent keeps the workbook where it is and sends only the context needed for hosted reasoning. That is a narrower transfer, not offline processing.
Three ways to use AI in Excel
The three options trade off the same axes: where the file lives, what the AI is allowed to touch, and how much of the workflow it can do end-to-end.
| Option | File location | Best for | Limits |
|---|---|---|---|
| Microsoft 365 Copilot in Excel | OneDrive (AutoSave on) | Formula drafting, chart summaries, in-flow chat on a single sheet | Requires M365 Copilot license; file must be in the cloud; bounded to the active workbook |
| Web formula widget (Formula Bot, GPTExcel) | Stays local — you paste a description, not the file | One-off formulas, regex, conditional formatting expressions | The tool never sees the data; cannot do anything beyond writing the formula string |
| Desktop AI agent (Lapu AI) | Wherever the file is on your disk | Multi-step work across sheets and files; bulk fill; dedup; reconciliation; .xlsx round-trip from PDF or CSV | Needs a desktop install, path permission, internet access and approval for hosted reasoning context |
Copilot lives where most users already are — inside the Excel ribbon — and that is its real strength. You can ask it "summarize this sheet", "draft a SUMIFS for column F by region", or "make a chart of monthly revenue", and it answers without ever leaving the workbook. Microsoft's own walkthrough is the canonical reference for the in-app Copilot flow.
Web widgets do one job — turn an English description into an Excel formula — and they do it without ever touching your data. That is a real privacy property. It is also a hard ceiling: the widget can write =IFERROR(VLOOKUP(A2,Sheet2!A:C,3,FALSE),"") for you, but it cannot actually run that formula against your 18,000-row contract list, deduplicate the result, write the cleaned set to a second tab, and email a summary to your team. That last set of jobs is what people mean when they say they want "an AI Excel agent" — and that is the desktop-agent shape.
How a desktop AI agent uses your Excel files
A desktop AI agent treats your .xlsx the way a Python script does — except it writes the script itself, in response to a sentence of intent.
The workflow keeps file operations on your machine and uses hosted models for the reasoning step:
- Open the workbook. The agent uses a local Excel library (openpyxl on Python, ClosedXML on .NET, the Excel COM bridge on Windows) to load the file from disk. The workbook is not stored in a Lapu cloud workspace, although relevant cell context goes to hosted models for reasoning. The library can return cached values (last calculated) or original formula strings — a capable agent uses the formula view so it can rewrite, not just read.
- Read what it needs. Sheet names, column headers, the first N rows, any named ranges. The agent does not load the whole workbook into the model's prompt; it loads enough structure to plan.
- Plan and execute the work. The plan is a sequence of cell edits, formula writes, sheet additions, or shell calls (run a Python pandas pass, hit an internal API, fetch a PDF, etc.). Each write is gated: on Lapu AI, the agent asks before it touches your filesystem.
- Save in place or to a new file. The output is a clean
.xlsxthat opens directly in Excel — real number types, real dates, formulas where they belong, no string-typed amounts that block downstreamSUM.
# What the agent runs locally — the workbook stays on disk
from openpyxl import load_workbook
wb = load_workbook("/Users/you/Downloads/Q2-vendors.xlsx", data_only=False)
ws = wb.active
# Add a new column with a formula the agent wrote
ws.cell(row=1, column=ws.max_column + 1, value="margin")
for r in range(2, ws.max_row + 1):
ws.cell(row=r, column=ws.max_column, value=f"=(B{r}-C{r})/B{r}")
wb.save("/Users/you/Downloads/Q2-vendors-with-margin.xlsx")
That four-step shape is the same pipeline our PDF-to-Excel guide on the desktop describes for converting a vendor invoice into a clean workbook — the read-side just starts at a PDF instead of an .xlsx. For AI invoice processing that ends in Excel — capture, extract, validate, post — the same read side plugs into the AP-specific pipeline. For the broader pattern of running automation on your own machine instead of through a SaaS connector grid, see AI automation without Zapier. The Excel job is one slice of what a general desktop-native AI agent does across your files, shell, and other applications on macOS and Windows.
Tasks that fit a desktop agent better than Copilot
Copilot is one chat pane inside one workbook. A desktop agent is a process on your machine with access to your filesystem. That gap shows up as soon as the work crosses a single sheet.
- Bulk-fill a column across thousands of rows. Score a list of customer comments by sentiment, classify product SKUs into categories, write a one-line summary per row. Copilot can suggest the formula or model; a desktop agent actually runs it on every row and writes the result back without you re-prompting per chunk.
- Reconcile two workbooks against each other. Open
vendors-2026Q1.xlsx, opengl-export-q1.xlsx, match on invoice number, write a third workbook of mismatches. This is a three-file job — out of scope for an in-workbook Copilot chat by design. - Round-trip a PDF or CSV into the spreadsheet. Read the source file, extract the table, type-coerce, write the
.xlsx. The Excel team built the Power Query PDF connector for this; a desktop agent does the same job for files that the connector cannot parse cleanly, and writes the result without the user having to step through M code. For the parser-and-model half of that pipeline — including how to handle scanned invoices and tables — see the walkthrough on local PDF data extraction. See the best AI agent for Excel automation page for the full task list. - Clean a messy export. Standardize date formats, dedupe rows by composite key, strip currency symbols, flag rows that fail a regex. The data-cleanup agent pattern walks the dedup and normalization mechanics in detail.
- Keep the workbook out of cloud storage. Workbooks that contain banking details, personally identifiable information, salary data, or under-NDA vendor pricing may need to remain on an approved machine. A desktop agent reads them where they are, while relevant context still reaches hosted models under the product's processing boundary. Every action lands in a local AI audit trail so a reviewer can trace which fields the agent touched, in what order, and under which permission decision.
The connective tissue is that the work either crosses files, runs over many rows, or requires local file storage — three shapes that a single-workbook Copilot chat is not built for. Non-technical spreadsheet-heavy roles — see desktop workflows by role for the consolidated tour — hit these three shapes almost daily. The same pattern carries to other Office formats: see using AI to edit Word documents on the desktop for the .docx equivalent of everything here — open the file in place, edit the parts, write it back, with a permission gate on every save.
When Microsoft 365 Copilot is still the better choice
A desktop agent is not a replacement for Copilot. Copilot wins on the jobs it was built for.
- You are already in Excel with the file open and you want one formula, one chart, or one summary right now. Copilot answers in the same window with zero context switch.
- The workbook is already on OneDrive or SharePoint because it lives in a shared team folder, and the data is not sensitive.
- You want suggested PivotTable layouts, conditional formatting rules, or "what does this column mean" plain-English summaries inside the workbook.
- You want an AI that respects the Microsoft 365 admin policies your IT team already configured (DLP, retention, eDiscovery).
The two tools sit at different layers. Copilot is an AI feature inside Excel; a desktop agent is an AI user of your Excel files (and your filesystem, and your terminal, and your other apps). Pick by the job: ask Copilot inside the workbook, or ask the desktop agent when the job spans more than one file or the workbook must remain off cloud storage. Lapu AI still uses hosted reasoning. For the broader trade-off between in-app AI and an agent that lives outside the app, the local-first AI versus cloud AI guide is the longer read.
FAQ
- How do I use AI in Excel?
- You have three options. Inside Excel, Microsoft 365 Copilot adds a chat pane that drafts formulas, summarizes data, and builds charts — it needs an M365 Copilot license and the file on OneDrive with AutoSave on. Web widgets like Formula Bot generate one formula from a prompt. A desktop AI agent opens the .xlsx on your disk and runs multi-step work locally, with a permission gate on every write.
- Can AI read Excel files locally without uploading them?
- Yes, if local refers to file handling rather than offline inference. Lapu AI opens and writes the .xlsx on your disk instead of storing the workbook in a Lapu cloud workspace. Relevant cell values and instructions are still routed through Lapu AI infrastructure to hosted model providers for reasoning.
- What is the best AI Excel agent for a regulated machine?
- Pick an agent that reads and writes the workbook locally, requires approval for each file write and documents what reaches its model provider. Lapu AI opens the .xlsx from disk and writes the result locally, while relevant cell context goes to hosted models for reasoning. Confirm that processing boundary against your organization's data policy before using regulated data.
- Can AI read Excel formulas, not just values?
- Yes if the underlying library supports it. openpyxl can return either the formula string (`=SUM(B2:B30)`) or the cached calculated value, depending on the load mode. A capable desktop AI agent uses the formula view so it can rewrite or extend formulas, not just read the last calculated number.
- Does using AI in Excel require an internet connection?
- Lapu AI requires an internet connection for AI reasoning because relevant context is routed through Lapu AI infrastructure to hosted model providers. File reads, writes and local Python or shell steps still run on your machine. Lapu AI does not currently offer a fully offline model path.
- Can AI generate Excel formulas without seeing my data?
- Yes. Free web widgets like Formula Bot do exactly that — you describe the formula in English, the tool returns the formula, and you paste it into Excel. The widget never sees your sheet. This is fine for a one-off formula but not enough when the work spans many rows or many sheets.
- How is a desktop AI agent in Excel different from a macro?
- A macro is a pre-recorded script that runs the same way every time. A desktop AI agent reads the prompt, inspects the workbook, plans the steps, and writes the macro or formula it needs — adapting to the file in front of it. Macros are great when the job repeats exactly; an agent is better when the job is new each time.
- Is there a local AI for Excel that does not need Microsoft 365?
- Yes. Lapu AI can read and write an .xlsx on your filesystem without an M365 license, OneDrive or Copilot subscription. The file path must be accessible to the app, and internet access is still required because relevant spreadsheet context goes to hosted models for reasoning.
Sources
- How To Use AI in Excel — Microsoft (2025-09-01) · accessed 2026-06-23
- Frequently asked questions about Copilot in Microsoft 365 subscriptions — Microsoft Support (2026-01-15) · accessed 2026-06-23
- openpyxl — A Python library to read/write Excel xlsx/xlsm files — openpyxl project (2025-05-01) · accessed 2026-06-23
- Power Query PDF connector — Microsoft (2025-08-01) · accessed 2026-06-23

