Gemini API Now Accepts Word, Excel, and PowerPoint Files Directly, and Bills Only the Pages or Cell Ranges You Select
According to the Gemini API release notes (entry dated November 18, 2026), Office and OpenDocument files can now be sent without conversion, and when you choose page ranges, sheets, cell ranges, or content layers, only the selection is billed. We also cover how Gemini 4 and later read .docx and .pptx files as page images by default, unlike the extracted text Gemini 3 uses.
Google has made it possible to hand Word, PowerPoint, and Excel files, along with their OpenDocument counterparts, straight to the Gemini API. Alongside that, developers can now cut out just the part of a document, spreadsheet, video, or audio file they need and pass only that slice to the model. The release notes describe the feature as a way to process only the needed content and pay only for that portion1.
For apps that have Gemini read internal reports, estimate spreadsheets, or proposal decks, this means files can go in without a conversion step, and input tokens can be held down by sending a few pages out of a long document, or one block of cells out of a large sheet. There is a catch, though: Gemini 4 and later and Gemini 3 and 2.5 differ in how they ingest these files by default, so switching models calls for a check.
Documents, Slides, and Spreadsheets Handled Like PDFs
The document processing guide says Gemini models handle Office and OpenDocument formats just as they handle PDFs2. Files can be sent as inline data or uploaded through the Files API, inside a document content block with the matching MIME type.
Supported extensions are .docx, .doc, .dotx, and .odt for documents; .pptx, .ppt, and .odp for presentations; and .xlsx, .xls, and .ods for spreadsheets. A file can be up to 50 MB, an Office or OpenDocument file can run to 2,000 pages (or slides), and a spreadsheet sheet can hold up to 50,000 cells. The page limit counts the whole uploaded file, even when you only pass part of it.
The guide also notes that formats like HTML, XML, Markdown, and TXT are read as plain text, so their layout, formatting, and charts are lost.
Choose Pages, Sheets, or Cell Ranges, and Pay for That Selection
You make a selection by adding processing ({"type": "static", ...}) to the document block. According to the guide, this works on every Gemini 3 and Gemini 4 or later model, and tokens are counted and billed only for the slice the model receives2.
For documents and presentations (and for PDFs as well), use page_options:
start_pageandend_pageset a page range, numbered from 1 and inclusive at both endscontent_layerspicks page images (page_image), the text pulled from the pages (page_text), or the two together. Onceprocessingis set, the default is page images aloneresolutionon the document block sets the image detail. Per page,lowis about 280 tokens, the defaultmediumabout 560, andhighabout 1,120
For spreadsheets, use spreadsheet_options: sheet_index selects a sheet and visible_cells a range such as "A1:G40". Its content_layers can be evaluated values (data), formulas (formulas), and a rendered image of the sheet for charts and layout (visual); values and formulas are the default.
With big Office files and decks, the guide recommends reading everything as extracted text first, then asking for high-resolution page images only on pages with charts or crowded layouts. That works as a ready-made recipe for keeping input tokens down.
On Gemini 4 and Later, .docx Defaults to Page Images
The part to watch is what happens when you send a whole file with no processing option. The guide’s table works out as follows2.
| Extension | Gemini 4 and later | Gemini 3 and 2.5 |
|---|---|---|
.docx, .dotx, .odt, .pptx | Page or slide images (medium, about 560 tokens per page) | Extracted text (including embedded images) |
.doc, .ppt, .odp | Page or slide images (medium, about 560 tokens per page) | Page or slide images |
.xlsx, .xls | Values, formulas, and sheet names for every sheet | Every sheet as CSV (values only) |
.ods | Values, formulas, and sheet names for every sheet | Values, formulas, and sheet names for every sheet |
In other words, the same .docx sent with the same code reaches the model as text on Gemini 3 but as page images once you move to a Gemini 4 model, such as Gemini 4 Hydrogen, released on November 12, or Gemini 4 Carbon. Excel files likewise shift from value-only CSV to a form that includes formulas. The guide gives no token count for the extracted-text path, so its table does not tell you which one is larger. Measuring input tokens on your own files before migrating is likely the safest approach. Setting content_layers explicitly rather than relying on defaults should also make it easier to keep what the model receives the same across model changes.
Agent Tools Can Return “the Next Pages”
Slicing is not limited to user input; it also works inside function call results (function_result). The function calling guide says tools can use the same processing and resolution fields to return selected pages, spreadsheet ranges, or video and audio clips3. Because the model is automatically given the total page count and the worksheet names, it can ask for a narrower range in a later turn.
For agents that work through long manuals or big spreadsheets, this makes it easier to skip loading everything up front and have a tool return only the pages requested. On November 19, the Interactions API also gained Tool Retrieval in preview, which loads tool schemas only when they are needed, so features that trim what goes into the input arrived back to back that week.
According to the release notes, video and audio can be sliced too, by choosing time intervals or layers such as transcripts1. If documents are the core of your integration, a sensible path is to first confirm how the default ingestion changes between model generations, then move toward stating page ranges and content layers explicitly.
Sources
- Release notes - Gemini API release notes (entry dated November 18, 2026; checked November 21, 2026)
- Document understanding - Gemini API documentation (Office and OpenDocument files / Customize document, presentation, and spreadsheet processing / Technical details; checked November 21, 2026)
- Function calling - Gemini API documentation (Slice and inspect files in function responses; checked November 21, 2026)
Was this article helpful?
Thank you!
Received. Thank you!