libreoffice-calc
Automate LibreOffice Calc spreadsheets with UNO
Manual spreadsheet editing is tedious and error-prone. This skill automates Calc operations programmatically through the UNO API for reliable batch processing.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "libreoffice-calc". Create spreadsheet, add data to range A0:B2, export to PDF
Expected outcome:
- Spreadsheet created at /reports/output.ods
- Data written to range Sheet1.A0:B2 (3 cells)
- Exported to PDF: /reports/output.pdf (127 KB)
Using "libreoffice-calc". Read cell B5 from /data/sales.ods
Expected outcome:
- Cell Sheet1.B5:
- Value: 4250.00
- Type: number
- Formula: None
Using "libreoffice-calc". Create bar chart from A0:C10, anchor at row 12
Expected outcome:
- Chart 'Sales Overview' created on Sheet1
- Data range: A0:C10 (11 rows, 3 columns)
- Position: Row 12, Column 0
- Dimensions: 8000 x 6000 units
Security Audit
Low RiskStatic analysis flagged 197 patterns across 13 files. After evaluation, all high-severity findings are false positives: cryptographic warnings misidentified UNO connection code, 'system reconnaissance' flagged exception class definitions, and 'dynamic imports' were standard Python import statements. Shell command patterns exist only in markdown documentation. The single confirmed external command (subprocess.Popen launching LibreOffice) uses hardcoded arguments with no user input injection risk. Temp file usage follows Python best practices with proper cleanup. Skill is safe for publication with minor documentation recommended.
Low Risk Issues (2)
Risk Factors
⚙️ External commands (1)
📁 Filesystem access (2)
🔑 Env variables (1)
Quality Score
What You Can Build
Automated Financial Reporting
Generate monthly revenue reports by populating templates with data, applying currency formatting, and creating trend charts for stakeholder presentations.
Bulk Data Export and Transformation
Extract data from databases or APIs into structured spreadsheets, apply validation rules, and export to multiple formats for distribution.
Template-Based Document Generation
Populate pre-designed spreadsheet templates with dynamic data for invoices, timesheets, or inventory reports with consistent formatting.
Try These Prompts
Create a new Calc spreadsheet at /reports/monthly-data.ods with a sheet named 'Data'. Add headers 'Name', 'Value', 'Date' in row 0, then populate with 5 sample rows. Apply bold formatting to the header row and currency format to the Value column.
Open /reports/monthly-data.ods and export it to three formats: PDF at /exports/monthly-data.pdf, Excel at /exports/monthly-data.xlsx, and CSV at /exports/monthly-data.csv. Verify all exports complete successfully.
In /reports/sales.ods, create a line chart titled 'Monthly Sales' using data from Sheet1 range A0:B12. Anchor the chart at row 15, column 0 with width 8000 and height 6000. Then add data validation to column B requiring values between 0 and 10000 with error message 'Enter sales between 0 and 10000'.
Apply this patch to /reports/quarterly.ods in atomic mode: Update cells in range A0:D4 with new quarterly data, format the header row with bold and background color, create a pie chart showing category distribution, and recalculate all formulas. If any operation fails, roll back all changes.
Best Practices
- Always use absolute file paths when working with Calc APIs to avoid resolution errors
- Close sessions properly using context managers or explicit close() calls to release LibreOffice resources
- Use atomic patch mode for related operations that should succeed or fail together
- Validate data types before writing to cells to prevent type conversion issues
Avoid
- Using one-based coordinates like in Calc UI - the API uses zero-based indexing
- Mixing cell and range targets - they are distinct types even for single cells
- Calling session methods after close() - always check session state before operations
- Assuming chart names are auto-generated - always specify explicit titles for reliable targeting