processing-excel-fileslisted
Install: claude install-skill zgldh/xlsx-populate-skill
# Processing Excel Files
Edit and manipulate Excel files using the xlsx-populate library while perfectly preserving original formatting.
## When to Use
- User wants to edit existing Excel files without destroying formatting
- Working with .xlsx files that have complex layouts or merged cells
- Need to add formulas, styling, or new worksheets to existing files
- Creating Excel reports from templates
## When NOT to Use
- Only need to read data from Excel (use `xlsx` library instead for better performance)
- Creating simple Excel files from scratch without formatting concerns
## Quick Start
```javascript
const XlsxPopulate = require('xlsx-populate');
// Load and edit
const workbook = await XlsxPopulate.fromFileAsync('input.xlsx');
workbook.sheet(0).cell('A1').value('Updated');
await workbook.toFileAsync('output.xlsx');
```
## Installation
```bash
npm install xlsx-populate
```
## Core Operations
### 1. Load and Preserve Formatting
```javascript
const workbook = await XlsxPopulate.fromFileAsync('file.xlsx');
const sheet = workbook.sheet(0);
// All original formatting is preserved automatically
sheet.cell('A1').value('New Value');
await workbook.toFileAsync('output.xlsx');
```
### 2. Add Formulas
```javascript
// Use formulas, not hardcoded values
sheet.cell('D10').formula('=SUM(D2:D9)');
sheet.cell('E5').formula('=(C5-B5)/B5'); // Growth rate
```
### 3. Apply Styles
```javascript
sheet.cell('A1').style({
bold: true,
fontSize: 14,
fill: '4472C4',
fontColo