Skip to content

API Reference parrot.tools.excel_intelligence

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.tools.excel_intelligence

View source

ExcelIntelligenceToolkit — LLM-callable tools for Excel file analysis.

Wraps :class:ExcelStructureAnalyzer and exposes three async tools:

  • inspect_workbook — structural map of sheets and tables
  • extract_table — clean tabular data for a specific table
  • query_cells — raw cell values for arbitrary ranges

Alias AbstractToolkit

Re-exported from parrot.tools.toolkit.AbstractToolkit.

Class ExcelIntelligenceToolkit

Toolkit for intelligent Excel file analysis.

Provides LLM agents with tools to analyze complex Excel workbooks:

  1. inspect_workbook — structural map of sheets and tables
  2. extract_table — clean tabular data for a specific table
  3. query_cells — raw cell values for arbitrary ranges

Analyzers are cached by file path so repeated calls against the same workbook do not re-parse the file.

Parameter Type Default Description
**kwargs {}

Attributes:

Attribute Type Description
tool_prefix str

Method ExcelIntelligenceToolkit.inspect_workbook

Analyze the structure of an Excel workbook.

Returns a map showing all sheets, detected tables with IDs, column names, and ranges. Use table IDs with extract_table.

inspect_workbook(file_path: str, sheet_name: Optional[str] = None) -> str

Parameter Type Default Description
file_path str Path to the Excel file (.xlsx, .xls).
sheet_name Optional[str] None Specific sheet to analyze. If None, analyzes all.

Returns: str — Human-readable structural map of the workbook.

Method ExcelIntelligenceToolkit.extract_table

Extract a specific table as clean tabular data.

Use table_id from inspect_workbook results.

extract_table(file_path: str, sheet_name: str, table_id: str, include_totals: bool = False, max_rows: int = 200, output_format: str = 'markdown') -> str

Parameter Type Default Description
file_path str Path to the Excel file.
sheet_name str Name of the sheet containing the table.
table_id str Table ID (e.g. 'T1', 'T2') from inspect_workbook.
include_totals bool False Include total/summary rows.
max_rows int 200 Maximum rows to return.
output_format str 'markdown' 'markdown', 'csv', or 'json'.

Returns: str — Table data in the requested format.

Method ExcelIntelligenceToolkit.query_cells

Read raw cell values from a specific range.

query_cells(file_path: str, sheet_name: str, cell_range: str) -> str

Parameter Type Default Description
file_path str Path to the Excel file.
sheet_name str Sheet name.
cell_range str Excel-style range (e.g. 'B10:I16').

Returns: str — Tab-separated cell values, one row per line.

Method ExcelIntelligenceToolkit.cleanup

Close all cached workbooks and clear caches.

cleanup() -> None

Alias ExcelStructureAnalyzer

Re-exported from parrot.tools.dataset_manager.excel_analyzer.ExcelStructureAnalyzer.

Alias SheetAnalysis

Re-exported from parrot.tools.dataset_manager.excel_analyzer.SheetAnalysis.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally