Agent in the spreadsheet
What it is
Section titled “What it is”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.
How to use it
Section titled “How to use it”- 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.
- 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.
- New dialogue (the plus in the panel header, or the button in the history) 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.
- Dialogue history (the menu button on the left of the header) shows the conversations of this spreadsheet. Search dialogues searches both by title and by words from the conversation. To go back to a conversation, click Go to dialogue.
- 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 line above the answer. Click it to expand the steps.
- 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.
- 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.
- 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.
- What the agent can do:
- look at the structure of the workbook: sheets, where the data is, columns, formulas with errors, rules, protection, charts and pivot tables;
- read a cell with all its properties and discussions, or a range or a sheet: values, formulas, or both. 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;
- 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.
- 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.
Limits
Section titled “Limits”- 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.
- 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.
- 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 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.
- 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.
If something goes wrong
Section titled “If something goes wrong”| 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 | Ask the owner for the Editor role |
| 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 | A question about a sheet not in Data, or a formula that refers to such a sheet or uses ДВССЫЛ (INDIRECT) | Tick the sheet in Data: N sheets, or click Select all |
| 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 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 |
