extract_html opens a document for editing: it converts the whole document — or one worksheet (worksheet), one slide (slide), or a PDF page range (pages) — into an HTML file in the output folder, keeping fonts, styles, tables and images. The agent edits that file, then calls save_from_html. Example prompt: “Open the Q3 worksheet of budget.xlsx for editing.”
Tool description (as the AI agent sees it):
Opens a document for editing: converts it — or one worksheet, one slide, or a PDF page range — into editable HTML and saves the .html file to storage, keeping fonts, styles, tables and images. Edit that file, then call save_from_html to turn it back into DOCX, XLSX, PPTX, PDF or another format. For a simple find-and-replace use replace_text instead. Supports DOCX, DOC, RTF, ODT, XLSX, XLS, ODS, CSV, PPTX, PPT, ODP, PDF, TXT, HTML, XML, Markdown, EPUB, MOBI, EML and more. Do NOT pre-check whether files exist — just pass the filename the user provided; a missing file returns the list of available files. By default the HTML is self-contained (images, CSS and fonts embedded); set embedResources=false to get .html plus a _resources folder. Returns the saved path (‘Saved to: …’), which part was extracted (e.g. ‘worksheet 2 of 3’), and a plain-text preview of the content. On failure isError is set and the text starts with ‘HTML extraction failed for’; a file that cannot be found returns the list of available files instead.
(Wrapped for width.) The HTML file is named after the part: <name>_worksheet2.html, <name>_slide2.html, <name>_pages1-2.html, or <name>.html for a whole document. embedResources (default true) keeps images, CSS and fonts inside the one file; pagination: true keeps page boundaries for Word and PDF.
In evaluation mode the server refuses a worksheet or slide past the second, and says why:
HTML extraction failed for 'budget.xlsx': Evaluation mode edits only the first
2 visible worksheets of a workbook; worksheet 3 is beyond them. Set
GROUPDOCS_LICENSE_PATH, or the metered keys, to edit every worksheet.
A PDF extraction holds at most two pages per call in evaluation mode: pages: "1-3" returned pages 1 and 2 and stopped at the first line of page 3, with no error beyond the evaluation line; pages: "3" on its own extracted page 3.
Example prompts
“Open the Q3 worksheet of budget.xlsx for editing.”
“Give me slide 2 of the review deck as HTML.”
“Turn pages 1-2 of travel-policy.pdf into something I can edit.”