Skills libreoffice-calc
📊

libreoffice-calc

Low Risk ⚙️ External commands📁 Filesystem access🔑 Env variables

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.

Supports: Claude Codex Code(CC)
🥉 73 Bronze
1

Download the skill ZIP

2

Upload in Claude

Go to Settings → Capabilities → Skills → Upload skill

3

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 Risk
v2 • 3/19/2026

Static 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.

13
Files scanned
2,642
Lines analyzed
5
findings
2
Total audits
Low Risk Issues (2)
Subprocess Launch of External Application
LibreOffice soffice binary launched via subprocess.Popen. Arguments are hardcoded with no user input injection vectors. Process is properly terminated and temp directories cleaned up in finally block.
Temporary Directory Creation
Creates temporary directories for LibreOffice profile isolation using tempfile.mkdtemp. Directories are cleaned up in finally block with shutil.rmtree.

Risk Factors

Audited by: claude View Audit History →

Quality Score

64
Architecture
100
Maintainability
87
Content
23
Community
86
Security
83
Spec Compliance

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 Basic Spreadsheet
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.
Export Spreadsheet to Multiple Formats
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.
Create Chart with Data Validation
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 Patch to Update Existing Report
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

Frequently Asked Questions

Do I need LibreOffice installed to use this skill?
Yes, LibreOffice must be installed on the system with UNO Python bindings. The skill auto-detects common installation paths or you can set LIBREOFFICE_PROGRAM_PATH environment variable.
Can this skill modify Excel (.xlsx) files?
LibreOffice Calc can open and save .xlsx files, but the primary format is .ods. Export to .xlsx is supported. For best compatibility, work in .ods format and export when needed.
How do I handle formulas in cells?
Set value_type='formula' when writing cells and provide the formula string (e.g., '=SUM(A1:A10)'). Formula results are returned when reading cells, along with the formula text and any error state.
What happens if LibreOffice crashes during operations?
The skill uses isolated profile directories for each session. If a crash occurs, clean up temp directories manually from /tmp/libreoffice-skills-* and restart. Atomic patch mode helps prevent partial updates.
Can I run multiple Calc sessions simultaneously?
Yes, each session uses a unique pipe name and isolated profile directory. However, running many concurrent sessions may impact system resources.
Why are my coordinates off by one?
The API uses zero-based indexing while Calc's UI shows one-based row/column numbers. Row 0 in the API equals Row 1 in Calc. Adjust your coordinates accordingly.

Developer Details

File structure