excel-generator

Generate Excel spreadsheets, Google Sheets, and PDF exports with formulas, charts, and financial models.

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/SaberAloui/agri-hub --skill excel-generator-saberaloui
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: excel-generator
Source: https://github.com/SaberAloui/agri-hub/tree/main/.local/secondary_skills/excel-generator
Command: npx skills add https://github.com/SaberAloui/agri-hub --skill excel-generator-saberaloui

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openpyxl, xlsxwriter, xlrd, pandas, gspread, google-auth, google-api-python-client, and includes references (resource) components.

What problem does it solve? Building polished spreadsheets programmatically is error-prone: choosing the wrong library, mishandling formulas, or hitting memory limits on large datasets wastes hours. This Skill provides tested recipes for creating .xlsx files, Google Sheets, and PDF exports with correct formulas, formatting, charts, and financial models. ## Core Features & Use Cases - Spreadsheet Generation: Create .xlsx files with openpyxl or xlsxwriter including formulas, conditional formatting, data validation, charts, and print layouts. - Financial Models: Ready-made recipes for 3-statement models, DCF, LBO, comparable company analysis, and M&A accretion/dilution models. - Google Sheets & PDF Export: Generate Google Sheets via gspread or convert workbooks to PDF using LibreOffice CLI with proper print setup. - Use Case: A user asks for a DCF valuation of a public company. The Skill gathers real financials via web search, builds a multi-sheet workbook with assumption-driven formulas, sensitivity tables, and exports a formatted PDF. ## Quick Start Create an Excel financial model for Tesla with a 5-year DCF, sensitivity table, and charts, then export it as a PDF.

Frequently Asked Questions about excel-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an Excel file with formulas in Python?▼

Use xlsxwriter for new files or openpyxl to edit existing ones, writing formulas as strings like ws.write_formula(0, 3, "=B1*C1"). Python does not evaluate formulas; Excel computes them when the file is opened.

openpyxl vs xlsxwriter: which should I use?▼

Use xlsxwriter for creating new files, large datasets, and richer formatting since it is faster and write-only. Use openpyxl when you need to read or modify an existing .xlsx file, since xlsxwriter cannot open files.

Can Python create native Excel PivotTables?▼

No, Python libraries cannot create native PivotTables because they require cached data. Build the equivalent using pandas pivot_table with groupby aggregation or SUMIFS-based formula grids that update dynamically in Excel.

How do I handle Excel files with over 100K rows in Python?▼

Use xlsxwriter with constant_memory: True for writing, which streams rows to disk using about 200MB RAM for 1M rows. For reading, use openpyxl in read_only mode and process rows in batches.

How do I convert an xlsx file to PDF?▼

Run LibreOffice headless with the command libreoffice --headless --calc --convert-to pdf --outdir ./output report.xlsx. Set print layout options like fitToWidth, margins, and repeated header rows first for clean output.

Why does my cross-workbook formula show #REF! in Excel?▼

Python writes external references like '[file.xlsx]Sheet'!B2 as strings without cached values. Excel shows #REF! until the linked workbook is also open or the link is updated, so generate all data workbooks before the master file.