calc

Create, convert, and automate spreadsheets in ODS, XLSX, and CSV formats using LibreOffice Calc.

Updated Sep 20, 2024
One-click install
npx skills add https://github.com/AnasIsmai1/dotfiles --skill calc-anasismai1
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: calc
Source: https://github.com/AnasIsmai1/dotfiles/tree/main/claude/.claude/skills/libreoffice/calc
Command: npx skills add https://github.com/AnasIsmai1/dotfiles --skill calc-anasismai1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ezodf, odfpy, pandas.

What problem does it solve? Working with spreadsheets across different formats (ODS, XLSX, CSV) often requires manual conversion, repetitive formula entry, and tedious batch processing. This Skill automates spreadsheet creation, format conversion, and data processing through LibreOffice Calc's command-line interface and Python UNO API. ## Core Features & Use Cases - Format Conversion: Convert between ODS, XLSX, XLS, CSV, PDF, and HTML formats, including batch conversion of multiple files via headless soffice commands. - Spreadsheet Automation: Create spreadsheets programmatically with formulas, data validation, and conditional formatting using Python UNO or ezodf. - Data Analysis: Build pivot tables, apply statistical functions, and import data from CSV files or databases. - Use Case: You receive 50 XLSX reports that must be archived as ODS and summarized. Use this Skill to batch-convert all files to ODS, then generate a summary spreadsheet with SUM formulas via a Python UNO script. ## Quick Start Convert the attached spreadsheet report.xlsx to ODS format and create a new spreadsheet with a SUM formula totaling the first column.

Frequently Asked Questions about calc

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

FAQPage Schema
How do I convert XLSX to ODS from the command line?▼

Run soffice --headless --convert-to ods spreadsheet.xlsx to convert XLSX to ODS without opening the GUI. The same pattern works for CSV, PDF, and HTML outputs, and you can loop over files for batch conversion.

How to automate LibreOffice Calc with Python?▼

Use the Python UNO API by connecting to a running soffice instance via socket on port 8100, then create SpreadsheetDocument instances to set cell values and formulas. Alternatively, use ezodf for simpler ODS creation without a running office process.

What formats can LibreOffice Calc convert between?▼

LibreOffice Calc accepts ODS, XLSX, XLS, CSV, DBF, and HTML as input formats. It can output ODS, XLSX, XLS, CSV, PDF, and HTML, covering most common spreadsheet exchange scenarios.

Why does the UNO socket connection fail in LibreOffice?▼

The connection fails when another soffice process is already running or the listener was never started. Kill existing processes with killall soffice.bin, then start the listener with soffice --headless --accept="socket,host=localhost,port=8100;urp;".

ezodf vs UNO API for ODS spreadsheet automation?▼

ezodf is simpler for creating and editing ODS files directly without a running LibreOffice process. The UNO API offers full access to Calc features like formulas and charts but requires a headless soffice socket connection.