Appearance
Excel Add-In for Octagon Agents
The Octagon Excel Add-In lets you call the Octagon Agent directly from Excel using a custom function.
This is ideal for analysts who want AI-powered financial research and market intelligence without leaving their spreadsheets.
The add-in currently exposes a single function under the OCTAGON namespace as
OCTAGON.AGENT.
Prerequisites
- An active Octagon account and API key
- The Octagon Excel Add-In installed in your Excel environment
- Network access so Excel can reach the Octagon API
If you need help getting an API key, see Getting Started.
The OCTAGON.AGENT Function
The OCTAGON.AGENT function calls the Octagon Agent that routes queries to specialized agents (SEC filings, transcripts, stock data, financials, etc.). The function uses the Octagon API structured output to return Excel-friendly data as a table or single cell value.
Function Signature
text
AGENT(prompt, [format])Parameters
prompt(string, required)
The question or instruction you want to send to the Octagon Market Intelligence agent.- Can be typed directly (e.g.
"Summarize Apple's Q3 2023 performance") - Or referenced from a cell (e.g.
A2)
- Can be typed directly (e.g.
format(string, optional)
Controls how the result is returned into Excel. Allowed values:"table"(default): returns tabular data over a range of cells."cell": returns a single value in the same cell as the formula."raw": returns the raw response text content
If
formatis omitted, the add-in defaults to"table".
Usage Examples
Example 1: Single-Value Numerical Output
Retrieve a single-value from Netflix's SEC filings:
text
=AGENT("What is the Total Number of Common Stock Shares Repurchased by Netflix (NASDAQ: NFLX) in Q4 2024?", "cell")This will return a single value in the cell where you enter the formula.
Example 2: Table Output for Time-Series Analysis
Get a table of open, close, and total trade volume for AAPL over the last 30 trading days:
text
=AGENT("Retrieve open, close, and total trade volume for AAPL over the last 30 trading days", "table")Enter this formula in the top-left cell of an empty area; Excel will spill the resulting matrix into adjacent cells.
Example 3: Comprehensive Financial Analysis
Put your question in cell A2, for example:
text
A2: "Compare recent funding activity for private AI infrastructure companies."Then call:
text
=AGENT(A2, "raw")This makes it easy to tweak prompts without editing the formula.
Best Practices
- Be specific: Include tickers, time periods, and metrics
- One task per formula: Ask one focused question per
AGENTcall for clearer, more reliable outputs. - Use tables for analysis: Prefer
"table"format when you want structured data to feed into charts, pivots, or models. Include specific column headers for the data you want to retrieve.
For more details about how the underlying Market Intelligence agent works, see
Octagon Agents for Market Intelligence and the octagon-agent reference.
Troubleshooting
No response / error value
- Check your network connection.
- Confirm your API key is valid and configured in the add-in settings.
Spill errors (
#SPILL!)- Clear any content blocking the spill range below/right of the formula cell.
Slow responses
- Shorten prompts or narrow the scope (e.g. fewer tickers or shorter time ranges).
If you continue to have issues, contact support at support@octagonai.co with your Excel version and a description of the formula you’re using.