The budget has three worksheets, and finance wants two cells changed on the second one. Handing the whole workbook to an AI agent to “update Q3” invites it to rebuild all three. With the GroupDocs.Editor MCP server running locally, Claude, Cursor or Copilot extracts only that worksheet as editable HTML, changes what you asked, and saves it back into a copy of the original workbook, so the other sheets never pass through the model. Slides work the same way:

In budget.xlsx, on the Q3 sheet, set Travel to 12,500 and rename Training to “Training (external)”. Leave the other sheets alone.

The step-by-step version is in the documentation: How to edit one worksheet or slide and splice it back into the original.

Why not hand the agent the whole file?

Because a model cannot hold a workbook. It can hold text. Every sheet you give it is a sheet it may “helpfully” restate: numbers reformatted, a formula turned into its value, a column it did not understand dropped. Even when nothing goes wrong, you cannot tell that from the reply. The fix is scope: give the agent exactly the part it was asked to change and keep the rest out of its reach.

HTML is the right shape for that part. Tables, styles, fonts and images survive in it, models read and write it well, and it maps back onto the original structure. Plain text would lose the formatting; the raw .xlsx XML is a maze no agent should be editing.

The round-trip

budget.xlsx  (3 worksheets: Summary, Q3, Q4)
   |-- extract_html {"file":{...},"worksheet":2} --> budget_worksheet2.html
   |        agent edits the HTML: Travel 9000 -> 12500,
   |        "Training" -> "Training (external)"
   '-- save_from_html {"htmlFile":{"filePath":"budget_worksheet2.html"},
                       "format":"xlsx",
                       "sourceFile":{"filePath":"budget.xlsx"},
                       "worksheet":2}
         --> budget-q3-revised.xlsx : worksheet 2 replaced, 1 and 3 untouched
evaluation mode: worksheets/slides 1-2 can be edited; the server refuses 3+

What the server returned

Captured from GroupDocs.Editor.Mcp 26.10.0 against a synthetic budget:

-> extract_html {"file":{"filePath":"budget.xlsx"},"worksheet":2}
<- Extracted worksheet 2 of 3 of 'budget.xlsx' as editable HTML
   Saved to: …/budget_worksheet2.html
   Next: edit the saved .html and call save_from_html to write it back
   as DOCX, XLSX, PPTX, PDF or another format.
   Preview (plain text): ... Cost centre Planned (EUR) Owner Hosting
   57600 IT Support 14400 IT Travel 9000 Sales Training 6000 HR

-> save_from_html {"htmlFile":{"filePath":"budget_worksheet2.html"},
     "format":"xlsx","sourceFile":{"filePath":"budget.xlsx"},
     "worksheet":2,"outputName":"budget-q3-revised.xlsx"}
<- Saved 'budget_worksheet2.html' into a copy of 'budget.xlsx',
   replacing worksheet 2 of 3 (XLSX)
   Saved to: …/budget-q3-revised.xlsx

Opening the result confirms the scope: on Q3, Travel is 12500 and the row reads “Training (external)”; Hosting and Support are unchanged; Summary and Q4 are as they were. The original budget.xlsx was not modified.

The extract response carries a plain-text preview, so the agent can confirm it has the right sheet before it edits anything, and a “Next:” line that tells it which call comes after. Agents follow those hints well.

Slides, and the one rule for presentations

The same pair works on a deck: extract_html with "slide": 2, edit, save_from_html with "slide": 2 and the original as sourceFile. In our run, slide 2 of a three-slide review deck went out as HTML, “12 percent” became “14 percent”, and it came back as review-revised.pptx with slides 1 and 3 intact.

For PowerPoint the sourceFile is not optional. HTML alone does not carry a slide master, and the server says so rather than producing a broken deck:

-> save_from_html {"htmlFile":{"filePath":"review_slide2.html"},
                   "format":"pptx"}
<- Save from HTML failed for 'review_slide2.html' (-> pptx): 'pptx' output
   cannot be created from HTML alone; pass the original document as
   'sourceFile'.

The message names the missing argument, so an agent fixes the call on its own.

When the round-trip beats find-and-replace

replace_text is the shorter path for a word or a name. The round-trip is for everything else: changing several cells at once, rewording a label and a number together, restructuring a table on a slide, or a phrase that replace_text cannot see because it is split across two formatting runs. It is also how the agent reads a part before deciding what to change.

Reading before writing

The first half of the round-trip is useful on its own. An agent asked “what is planned for travel in Q3, and who owns it?” can extract the Q3 sheet and answer from the HTML without touching anything, and an agent that is about to edit should do exactly that first: read the part, state the change it intends to make, then write. Put that order into your project instructions so it becomes the default:

To change a worksheet or slide, use the groupdocs-editor MCP server:
extract_html for that one part, edit the HTML, save_from_html with the
original as sourceFile and the same worksheet/slide number. Never rebuild
the whole workbook or deck. Say which cells or text you changed.

The last line matters most. “I changed Travel from 9000 to 12500 and renamed Training on Q3” is a reply a reviewer can check against the file in seconds.

Honest limits

  • Evaluation mode edits only the first two worksheets or slides, and the server refuses the third with a reason: “Evaluation mode edits only the first 2 visible worksheets of a workbook; worksheet 3 is beyond them.”
  • Unlicensed saves are drafts: the edited sheet gains a banner row at the top and the workbook gains an extra “Evaluation Warning” worksheet.
  • The extracted HTML of an unlicensed run starts with the same evaluation line (the preview above shows it), so the agent should edit the cells, not that line.
  • Worksheet and slide numbers are 1-based; hidden sheets and slides need showHidden.

FAQ

Does editing one sheet change the others? No. The edited HTML replaces only the worksheet you name, in a copy of the original; the rest is carried over from the source file.

Can I do this with PowerPoint slides? Yes, with "slide" instead of "worksheet", and the original passed as sourceFile, which PowerPoint output requires.

Where does the result go? To a new file in the storage folder, budget-q3-revised.xlsx here because we passed outputName; the original stays untouched.

Go deeper