How to send Gemini only the pages, tabs, or cells of a file you need
Based on a guide by Google on the Gemini API docs · Nov 19, 2026
You'll end with: Gemini API requests that read Word, PowerPoint, and Excel files directly and process only the page range, worksheet tab, or cell range you set.
Why it's worth having: Gemini counts and bills tokens only for the sliced output, so a long spec or bid package costs only the pages you ask about.
At a glance
The method, in short
- 1Pass the Office or PDF file to Gemini as a document block and add a processing setting to that block.
- 2Set page_options with start_page and end_page to read only a page range of a document or a deck.
- 3For spreadsheets, set spreadsheet_options with sheet_index for one tab and visible_cells for a range such as A1:H50.
- 4Scan a large file with page_text first, then ask for page_image at high resolution only for pages with charts.
Read the full guide from Google on the Gemini API docs
The guide has code for each option, the supported file types, and the token cost per page.