Skip to content

Agent in the spreadsheet

An assistant that works right inside an open spreadsheet. It looks at how the workbook is built, reads and searches data and cell discussions, looks at version history, calculates, changes the spreadsheet, builds charts and pivot tables, uploads files attached to the conversation into the spreadsheet, creates its own functions, and processes data with code when a formula cannot solve the task. The agent panel opens to the right of the spreadsheet.

  1. Click Agent in the spreadsheet header, or press Ctrl/⌘+Alt+A. A repeated click closes the panel, and so does Escape, if the input field is empty. You can change the width of the panel by dragging its edge.
  2. The panel opens the last conversation about this spreadsheet. If there are no conversations, History opens with the text No dialogues yet. A spreadsheet created in the Spreadsheets section starts the same way: it has no chat of its own, and a conversation about it appears when you start one.
  3. New dialogue (the plus in the panel header, or the button in the history, which sits in one row with Temporary dialogue) starts a Conversation about the spreadsheet, which is saved and appears in Chats. Its name is in your interface language. Temporary dialogue is marked Temporary. It is not added to the history, and it disappears when you close the panel, switch to another conversation, or leave the page.
  4. Dialogue history (the menu button on the left of the header) shows the conversations of this spreadsheet. Under the title of a conversation you see the beginning of its last message as plain text, without asterisks, hash signs or other formatting marks. Search dialogues searches both by title and by words from the conversation. To go back to a conversation, click Go to dialogue.
  5. The question is typed into the field Ask about the spreadsheet…. An empty conversation has hints: What’s in this spreadsheet?, Find errors and empty spaces, Calculate the totals by columns and Fill in the selection. Files, stopping an answer and editing a question work as in an ordinary chat. Your question is shown on the right, and the agent’s answer runs across the full width of the panel. The answer is a short summary: what was done and where (the address, the number, the sheet). How the agent got to the answer is shown in the Steps card above the answer: while the agent is working, the card is expanded and shows the step in progress, and when the answer is ready, it collapses; click it to expand the steps again. Tables and code in the answer are copied with the Copy rows and Copy buttons under them, as in the chat. Addresses in the answer are buttons. An address that the agent marked as a chip (“D797”, “B4:B6”), or an address with a sheet name (“‘Sheet 2’!A2:B3”), can be clicked: the spreadsheet switches to that sheet and selects the range. An address without a sheet name leads to the sheet that is open now. The agent calculates the numbers in its answer in the spreadsheet itself, not in its head. It names money in the currency of the spreadsheet, going by the cell format or the header; if no currency is visible, it writes the number without a sign. It names only a cause it has checked in the data, calls a guess a guess and says how to check it. When checking data, it compares each value with its neighbours in the column, with its row and with the format, and names the addresses of the values that stand out. It answers entirely in the language of the question, without stray English words in an answer in another language; function names, addresses and names from the spreadsheet stay as they are.
  6. Selection. Above the field you see the selected range, for example “Sheet 1!A1:C20”, so the agent understands “this” and “the selection”. The button Don’t pass selection removes it from the question until the next selection. When you start typing, the selection is fixed: clicks on the spreadsheet no longer replace it.
  7. Which sheets the agent sees. The Data: N sheets button opens the list Book sheets, with checkboxes and the button Select all. A new conversation starts with the sheet you are on. The last sheet cannot be cleared: you will see At least one sheet. If you selected cells on a sheet that is not in the selection and asked a question, that sheet is added to Data by itself.
  8. Ask about a range. Ask an agent in the cell menu opens the panel and puts “Analyze range … on sheet “…”.” into the field. You can add to the question before sending it.
  9. What the agent can do:
    • look at the structure of the spreadsheet: sheets, where the data is, columns, formulas with errors, rules, protection, charts and pivot tables. For each sheet, also the format of every column (money and currency, date, percentage), how many numbers stored as text it has and where they are; which fills, text colors and borders the sheet has and where; what is hidden, frozen and grouped;
    • read a cell with all its properties and discussions: whether it is a number, money (in which currency), a percentage, a date, text, or text that looks like a number (such text is not included in sums; for text such as “715,044” the agent gives both readings: 715 044 if the comma separates thousands, and 715.044 if it is a decimal fraction); the exact value and what is shown on the screen; the fill, the text color, the font, and each side of the border: thin, thick, double, dashed or no line; highlighting by rules; the row height and the column width, and whether the row or column is hidden or frozen; the values of a dropdown list. For a range or a sheet: values, formulas, both, or with details: the type and formatting of each cell. Rows you cannot see right now (hidden by a filter, by hand, or by a collapsed group) are named by the agent;
    • search for text or a sample, formula errors, all formulas, duplicate rows, gaps, data areas and cell discussions: who wrote what, and whether it is resolved; cells by their properties, for example numbers stored as text, a yellow fill, a thick border, amounts in yuan (the currency can be named by its sign or its code: “¥” and “CNY” find the same cells), highlighting by a rule;
    • tell, from the Version history, what has changed since a mark or a given time: which sheets and cells, what was there and what became of it. For example: “what has changed since this morning?” or “what did you change?”. The agent cannot return the spreadsheet to a version; it will tell you which version to go back to;
    • calculate formulas without changing the spreadsheet;
    • change the spreadsheet: everything you do through the menus and the right-click, such as values and formulas, formatting, rows and columns, hiding and groups, replace, move, filters, sheets, rules, protection, charts and pivot tables. The full list and the limits are in What the agent changes in the spreadsheet;
    • upload a CSV, TSV or XLSX file attached to the conversation, as new sheets or from a given cell, with the same import as Import done by hand;
    • create its own functions, for example =МАРЖА(D2;E2). They appear in the f(x) list next to the formula bar, in the Your functions group. Details are in Workbook functions;
    • process data with code when a formula cannot express the task: merge lists with typos, parse price lists with mixed units, bring phone numbers to one form. The result goes into the cells as values, not as formulas;
    • create a new spreadsheet with data.
  10. How to restore the earlier look. Before the first edit or file upload in each answer, the agent puts the mark Before agent edits into Version history (in your interface language: Before agent edits, 代理修改前). Under an answer that changed the spreadsheet there is a Before agent edits button. It opens the Version history of this spreadsheet in place of the agent panel. Click the mark Before agent edits, then Go to version, and in the confirmation click Go (see Spreadsheet version history). To go back to the conversation, use the Agent button.
  • The agent is available to the owner and the editors of the spreadsheet. Viewers and guests with a link do not have the Agent button. Nor is it there in a spreadsheet closed for the agent: in the Access window (the Agent row), in Settings → Privacy (Agent in my spreadsheets of the spreadsheet creator) or by turning off Agent in this workspace; see Data privacy. The agent does not open, read or change a closed spreadsheet, even from a chat.
  • The agent can do exactly what you can: it does not change protected sheets and ranges. It cannot return the whole spreadsheet to an earlier version; you do that in the Version history.
  • The agent only reads cell discussions: it cannot start a discussion, reply in it or close it. A mention sends notifications to colleagues, and that is a human decision.
  • Not supported: inserting pictures, a dropdown list from a range, a “Really delete?” question before deleting rows and sheets, and sending the spreadsheet as a file into the conversation.
  • The agent works only with the sheets in Data. A sheet the agent created, copied or uploaded from a file is added to this selection automatically. While only some sheets are selected, the agent does not calculate or write formulas that refer to an unselected sheet, or that use ДВССЫЛ (INDIRECT).
  • The selection is not passed if it is a single empty cell, or if more than 100 000 rows or 1 000 columns are selected.
  • In one step, the agent reads up to 8 000 cells and up to 32 000 characters, finds up to 200 matches, and calculates up to 10 formulas, up to 8 192 characters each. A search by properties checks up to 500 000 cells at a time, the overview of a sheet’s formatting covers the first 200 000 filled or formatted cells, and the details of a range describe up to 40 kinds of formatting; the agent looks at the rest cell by cell.
  • In one edit, the agent changes up to 20 000 cells, makes up to 200 changes, and fills up to 50 ranges. A workbook can have up to 50 sheets. A new spreadsheet can have up to 500 rows and 20 000 cells.
  • An edit is applied in full or not at all. If a co-author changed the spreadsheet while the agent was working, the agent’s edit is carried through their changes, the same way as yours: addresses shift past inserted and deleted rows, and in one cell the last written value stays. Nothing is written only if the edit cannot be carried through. In that case, the agent re-reads the spreadsheet.
  • Code calculation: up to 8 ranges and 100 000 cells of input. One run: up to 5 seconds and 64 MB of memory. In one answer: up to 8 runs and 30 seconds of work. Up to 20 000 cells are written into the spreadsheet, and only within the sheet — 99 999 rows and 999 columns; up to 50 rows are output in the answer. The code has no access to the internet or to files.
  • A file upload is only for a file attached to this conversation: CSV, TSV, TXT, XLSX, XLSM or XLTX. The limits are those of the manual import: a file up to 60 MB, and the plan’s limits (see Import, export and print).
  • The agent names up to 50 hidden row numbers at a time. Rows hidden by a filter view that you have switched on are seen by the agent as ordinary rows: a switched-on view lives only on your device.
  • In the version history, the agent names up to 30 latest versions, and in a comparison it shows up to 300 changed cells. It does not show changes on sheets not marked in Data.
  • A temporary dialogue that you have not returned to is deleted after a day. Search in the history: up to 200 characters.
  • The length of a question, the files, the number of steps and the time of an answer are the same as in the chat. See the Chats section.
  • An address becomes a button only if the agent marked it as a chip or wrote it with a sheet name; a plain “D797” in the text cannot be clicked. You cannot jump to a hidden sheet or to a sheet that does not exist in the spreadsheet. An address beyond the edge of the sheet selects the range up to the edge.
  • The Before agent edits button exists only in the agent panel inside the spreadsheet. In the Chats section the same conversation is shown without it: open Version history in the spreadsheet itself.
What you see on the screen Why What to do
No Agent button You are a viewer, or you opened the spreadsheet as a guest with a link; or the agent is closed for the spreadsheet Ask the owner for the Editor role; the agent is turned on by the spreadsheet creator (Access → Agent) or by the workspace owner
The agent replies that the owner of the spreadsheet closed its access to it, or that the agent is off in this workspace The spreadsheet is closed for the agent Turn it on where the answer points: the Access window or Settings → Privacy
Dialogue unavailable The conversation did not load, or was deleted Retry, or New dialogue
Could not load in the history A connection failure Retry
Step Sheet is outside the selected data The agent wanted to read, search, calculate, change or upload a file on a sheet not in Data, or a formula refers to such a sheet or to ДВССЫЛ (INDIRECT) Tick the sheet in Data: N sheets, or click Select all
Step No cells with these properties The sheet or the named area has no cells with these properties Specify the columns or rows to search in
Step Couldn’t read the search properties The agent named a property the search does not know, or a value in the wrong form; it gets the list of properties in reply Ask again in other words: fill, text color, border, format, currency
Step Search area too large The area of a search by properties is larger than 500 000 cells Name the columns or rows to search in
An address in the answer cannot be clicked The address is written without a chip and without a sheet name, or the sheet is hidden, renamed or deleted Open the sheet yourself, or ask the agent to give the address with the sheet name
Step Edit not applied, with I won’t change this: the range is protected in the answer The edit touched a protected range Remove the protection, or ask the person who set it
In the answer: The spreadsheet was changed while I was working A co-author changed the spreadsheet in a way that the agent’s edit cannot be carried through Repeat the request. The agent will re-read the spreadsheet
Step The formula for … was written with an error — not entered The formula cannot be parsed, so it was not written Clarify the task, or write the formula another way
Step The sandbox is busy, retrying later Many other users are running code right now Try again later, or ask for the same result with formulas
Step Code calculation rejected, and the answer says the data does not fit in the sheet The code result would go beyond column 999 or row 99 999; nothing was written Ask to write it further left or higher, on a new sheet, or in parts
Step Code run limit for this reply reached In this answer the code ran 8 times, or for 30 seconds Ask the question again, more simply or in parts
Step File not found in this chat The file is attached to another conversation, or was deleted Attach the file to this conversation and repeat
Step File not imported It is not a spreadsheet, the file could not be parsed, the sheet is protected, or the plan’s limit is used up. The reason is in the answer Attach a CSV or XLSX file. For the rest, see Import, export and print
No Before agent edits button under the answer The agent only read the spreadsheet, the edit was refused, the answer is still going, or the conversation is open in Chats Wait for the end of the answer; otherwise open Version history in the spreadsheet
Step Version not found There is no mark with this name in Version history. The agent will list the available ones Name the mark as it is labelled in Version history, or ask for the list of versions