Smart Excel/CSV file parsing with intelligent routing based on file complexity analysis. Analyzes file structure (merged cells, row count, table layout) using lightweight metadata scanning, then recommends optimal processing strategy - either high-speed Pandas mode for standard tables or semantic HTML mode for complex reports. Use when processing Excel/CSV files with unknown or varying structure where optimization between speed and accuracy is needed.
Provide intelligent routing strategies for parsing Excel/CSV files by analyzing complexity and choosing the optimal processing path. The skill implements a "Scout Pattern" that scans file metadata before processing to balance speed (Pandas) with accuracy (semantic extraction).
Before processing data, deploy a lightweight "scout" to analyze file metadata and make intelligent routing decisions:
openpyxl to scan file structure without loading dataKey Principle: "LLM handles metadata decisions, Pandas/HTML processes bulk data"
Use excel-parser when:
Skip this skill when:
Use the scripts/complexity_analyzer.py to scan file metadata:
python scripts/complexity_analyzer.py <file_path> [sheet_name]
What it analyzes (without loading data):
Output (JSON format):
{
"is_complex": false,
"recommended_strategy": "pandas",
"reasons": ["No deep merges detected", "Row count exceeds 1000, forcing Pandas mode"],
"stats": {
"total_rows": 5000,
"deep_merges": 0,
"empty_interruptions": 0
}
}
Based on complexity analysis:
Follow the selected path's workflow to extract data.
When: Simple/large tables (most common case)
Strategy: Agent analyzes ONLY the first 20 rows to determine header position, then use Pandas to read full data at native speed.
Workflow:
Sample First 20 Rows
pd.read_excel(..., nrows=20)Determine Header Position
Read Full Data
pd.read_excel(..., header=<detected_row>) to load complete dataToken Cost: ~500 tokens (only 20 rows analyzed) Processing Speed: Very fast (Pandas native speed)
For implementation details, see
references/smart_excel_router.py
When: Complex/irregular tables (merged cells, multi-level headers)
Strategy: Convert to semantic HTML preserving structure (rowspan/colspan), then extract data understanding the visual layout.
Workflow:
Convert to Semantic HTML
openpyxlrowspan and colspan attributes to maintain structureExtract Structured Data
Token Cost: Higher (full HTML structure analyzed) Processing Speed: Slower (semantic extraction) Use Case: Only for small (<1000 rows), complex files where Pandas would fail
For implementation details, see
references/smart_excel_router.py
Always run complexity analysis before processing. The metadata scan is fast (<1 second) and prevents wasted effort on wrong approach.
Never attempt HTML mode on files >1000 rows. Token limits will cause failures.
When in doubt, try Pandas mode first. It fails fast and clearly when structure is incompatible.
If processing multiple sheets from same file, run analysis once and cache results.
Never modify the original Excel file during analysis or processing.
FileNotFoundError or permission errorsBadZipFile or InvalidFileExceptionMemoryError or system slowdownread_only=True mode in openpyxlchunksize parameterUnicodeDecodeErrorpd.read_csv(..., encoding='gbk')Required Python packages:
openpyxl - Metadata scanning and Excel file manipulationpandas - High-speed data reading and manipulationThis skill includes:
scripts/complexity_analyzer.py - Standalone executable for complexity analysisreferences/smart_excel_router.py - Complete implementation reference with both processing pathsSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer