Skip to content

Analysing a spreadsheet

An assistant that may run code answers questions about a CSV or Excel file by calculating with it: totals, counts, averages, comparisons between groups, a chart, or a cleaned-up file to download. It writes a small program for this and runs it on a computer of its own. This page says how to ask such a question and what you see in the answer.

You ask questions about a spreadsheet here, in a chat with such an assistant. You do not need to put the data in a datastore first: a datastore keeps records that an application writes and reads, not a file you have a question about.

Which assistants can do this

Only an assistant your administrator has given the tool Run code. Next to the paperclip by the message box you can tell from the line The assistant cannot read an old .xls workbook: it appears only for an assistant that runs code. Any other assistant reads only the columns and the number of rows of a spreadsheet (Attaching documents to a chat). If you want an assistant that calculates with your files, ask your administrator; how they do it is in Letting an assistant calculate with files.

Asking a question about a file

  1. Attach the file with the paperclip, by pasting it or by dragging it into the chat window. CSV and Excel (.xlsx) work; up to ten files per message.
  2. Ask your question as concretely as you can, for example What is the revenue per region in 2025, and which region grew fastest? or Make a bar chart of the number of complaints per month.
  3. Send the message. The assistant reads the file, calculates, and answers with the result.

A CSV with ; between the fields and a decimal comma (12,50), as Dutch and many European exports are, is read correctly: the assistant first checks how the file is laid out and only then calculates.

The assistant cannot open an old Excel workbook (.xls). Save it in Excel as .xlsx or as CSV and attach that file.

Asking a follow-up question

Every answer starts on an empty computer, but the assistant finds on it the files of your earlier messages in the conversation and the files its earlier answers exported, so you can ask a follow-up question about the same file without attaching it again. Anything it made and did not export is gone at your next message. In a very long conversation some files may be left out; the assistant says which.

Seeing what the assistant did

Each step on the computer is a row in the answer: Running code, Writing a file or Reading a file, followed by the start of the command or the name of the file. Choose a row to open the step:

  • Command shows what the assistant ran, and Output what that printed; an error message appears below it as error output. Use Copy to take them over.
  • Succeeded · exit code 0 means the command worked. With Failed · exit code, the assistant sees the error too and usually tries again; you see that as a next row.
  • Stopped after 120 seconds: a command may take about two minutes. For a large file, ask for a simpler calculation or for the work in parts.
  • Cut to 32 KiB, as the assistant received it too.: the output was longer, and the assistant also read only this part.
  • For a file it wrote you see File and Content, for example the script the assistant then ran.
  • Technical details at the bottom shows the step as it was recorded.

The assistant takes every figure in its answer from code it ran. If a decision rests on a figure, open the step and look at how it was calculated.

Charts, tables and files in the answer

  • Charts and tables are in the text of the answer. OS draws a chart from the figures the assistant calculated, in your organisation's colours. Under every table are Download as Excel and Download as CSV.
  • Pictures the code drew, such as a figure that is not an ordinary chart, are under Files of this answer and often in the text as well.
  • Files you asked for, such as a cleaned-up CSV, an Excel workbook or a PDF, are under Files of this answer. Choose a file to download it. They are kept for as long as your organisation keeps files.

What happens to your data

The assistant's computer has no internet. The code it writes cannot send your file anywhere, not even if a cell contains something that tries to talk it into doing so. After the answer the computer disappears with everything on it; what remains is the answer, the steps you can open and the files the assistant included in it.

If it does not work

  • The assistant says it cannot read the file: if it is an .xls, save it as .xlsx or CSV. If it is a scan or a PDF with a table, ask for the data as CSV or Excel.
  • The answer says your organisation cannot run code: the assistant cannot calculate right now. Ask your administrator; they see at the assistant why.
  • The answer stops because the monthly budget is used up: your organisation has reached its budget for this month. Try again once there is budget again.