---
Product: Aspose.Cells
Platform: typescript
Page Type: index
Canonical URL: https://products.aspose.org/cells/typescript/
---

# Aspose.Cells FOSS for TypeScript

Create, modify, and export Excel spreadsheets from TypeScript -- free and open-source, zero Microsoft Office dependency.

Aspose.Cells FOSS for TypeScript is a free, MIT-licensed library for working with XLSX Excel spreadsheets, with one-way export to CSV, Markdown, JSON, and HTML.

## Open-Source TypeScript Library for Excel Spreadsheets

Aspose.Cells FOSS for TypeScript is a free, open-source library for working with spreadsheet files in TypeScript applications. Build it from source and start creating and reading XLSX workbooks, applying styles, and building charts, all without requiring Microsoft Excel or any Office dependency. Export finished workbooks to XLSX, CSV, Markdown, JSON, or HTML. The library exposes a clean API built around `Workbook`, `Worksheet`, `Cell`, and `Style` -- the familiar objects every spreadsheet developer knows. Read and write cells using `putValue()`, style them with `Style`, `Font`, and `Fill` objects, add charts via `ChartCollection`, and set up data validation, auto-filters, comments, and hyperlinks on any worksheet. For the enterprise product family, see [Aspose.Cells — Enterprise Product Family](https://products.aspose.com/cells/).

## Read and Write Excel Files

- **XLSX round-trip:** Load workbooks with `Workbook.load()` and save with `workbook.save()` preserving cell values, formulas, and styles.
- **Cell access:** Read and write values with `worksheet.putValue()` and `worksheet.getCell()` by row/column index or cell reference.
- **Formulas:** Write formula strings via `cell.setFormula()` -- stored verbatim in XLSX, evaluated by Excel or LibreOffice on open.
- **Multiple worksheets:** Create, rename, move, and remove worksheets with `WorksheetCollection` methods including `addWorksheet()`, `removeWorksheet()`, and `moveWorksheet()`.

## Where Aspose.Cells FOSS Can Be Used

- **Data pipelines:** Export database query results directly to XLSX or CSV using `workbook.toCsv()`.
- **Report generation:** Build styled, branded Excel reports without Office installed.
- **Documentation:** Convert spreadsheets to Markdown via `workbook.toMarkdown()`.
- **ETL workflows:** Read input sheets, transform data, and write output workbooks.
- **CI/CD automation:** Generate test-result spreadsheets inside Docker containers.

## Styling, Charts, and Shapes

- **Font and fill:** Apply bold, italic, font size, and colors via `Style` with `setBold()`, `setItalic()`, `setFontSize()`, and `setFontColor()`.
- **Number formats:** Set date, currency, and custom number formats per cell using `numFmtId` in `Style`.
- **Charts:** Build bar, line, pie, area, and scatter charts with `ChartCollection` and render chart data via `ChartRenderer`.
- **Shapes:** Add vector shapes to worksheets with `addShape()` supporting rectangles, ellipses, arrows, connectors, and more via the `ShapeInfo` hierarchy.

## Export and Protection

- **Multi-format export:** Save to XLSX, CSV, JSON, Markdown, and HTML using `workbook.save()` or dedicated methods like `toJson()`, `toCsv()`, `toMarkdown()`, and `toHtml()`.
- **HTML round-trips both ways:** `HtmlExporter` writes a styled workbook out to HTML; `HtmlReader` brings HTML tables back in as a workbook -- the one format this library handles in both directions.
- **Workbook protection:** Protect workbooks with a password using `workbook.protect(true, "password")`.
- **Cell protection:** Lock individual cells with `style.setLocked(true)` and control formula visibility with `style.setHidden()`.

## Data Validation and Filtering

- **Data validation:** Add list, number, and custom validation rules to cell ranges with `DataValidation` and `worksheet.addDataValidation()`.
- **Auto-filter:** Set filterable column headers with `worksheet.setAutoFilter()` and remove filters with `removeAutoFilter()`.
- **Conditional formatting:** Apply color scales, data bars, and icon sets via `ConditionalFormatCollection` with `ColorScaleRule`, `DataBarRule`, and `IconSetRule`.
- **Comments:** Attach cell comments with `Comment` objects via `worksheet.addComment()`.

## Developer Experience

Aspose.Cells FOSS for TypeScript is built from source. There are no native Office libraries or system packages to install. The library runs on any Node.js environment with TypeScript 5+ support.

The API covers `Workbook`, `Worksheet`, `Cell`, `Style`, `Font`, `Fill`, `Chart`, `DataValidation`, `AutoFilter`, `Comment`, `Hyperlink`, and `Shape` -- the core objects for real-world spreadsheet automation. The codebase is MIT-licensed, hosted on GitHub, and accepts bug reports and pull requests.

## Write Cell Values and Formulas

Create a workbook, write different value types to cells, and set formulas that Excel evaluates on open.

```typescript
const workbook = new Workbook();
const worksheet = workbook.worksheets[0]!;
worksheet.putValue("A1", 42);
worksheet.putValue("A2", 3.14159);
worksheet.putValue("A3", "Hello World");
const cellA4 = worksheet.getCell2("A4");
cellA4.setFormula("=SUM(A1:A2)");
await workbook.save("output.xlsx");
```

## Apply Font Styling

Set font name, size, bold, italic, and color on a cell using the `Style` class.

```typescript
const workbook = new Workbook();
const worksheet = workbook.worksheets[0]!;
const style = new Style();
style.setFontName("Arial");
style.setFontSize(14);
style.setBold(true);
style.setItalic(true);
style.setFontColor("FF0000");
const cell = worksheet.getCell2("A1");
cell.putValue("Styled Text");
cell.setStyle(style);
await workbook.save("styled.xlsx");
```

## Set Up Auto-Filter

Populate a data range and enable auto-filter headers for interactive column filtering in Excel.

```typescript
const workbook = new Workbook();
const worksheet = workbook.worksheets[0]!;
worksheet.putValue("A1", "Name");
worksheet.putValue("B1", "Age");
worksheet.putValue("C1", "City");
worksheet.putValue("A2", "Alice");
worksheet.putValue("B2", "25");
worksheet.putValue("C2", "New York");
worksheet.putValue("A3", "Bob");
worksheet.putValue("B3", "30");
worksheet.putValue("C3", "London");
worksheet.setAutoFilter("A1:C4");
await workbook.save("filtered.xlsx");
```

## Frequently Asked Questions

### What is Aspose.Cells FOSS for TypeScript?

It is a free, MIT-licensed TypeScript library for creating, reading, modifying, and exporting Excel spreadsheets without requiring Microsoft Office.

### Which file formats are supported?

`.xlsx` is the only format the library can start from. Everything else -- CSV, JSON, Markdown, and HTML -- is export-only, generated from an in-memory `.xlsx` workbook. HTML is the one exception: a separate `HtmlReader` class turns an HTML file back into a workbook.

### Does it require Microsoft Excel or Office?

No. Aspose.Cells FOSS is a pure TypeScript library with no dependency on Microsoft Office, COM automation, or any proprietary runtime.

### How do I install it?

Build the package from source. No additional system packages or native extensions are required.

### Can I apply cell styling?

Yes. Use the `Style` class with methods like `setBold()`, `setItalic()`, `setFontSize()`, `setFontName()`, and `setFontColor()` to style individual cells.

### Is workbook protection supported?

Yes. Call `workbook.protect(true, "password")` to protect a workbook with a password. Individual cells can be locked with `style.setLocked(true)`.

## Support and Learning Resources

- [Documentation](https://docs.aspose.org/cells/typescript/)
- [API References](https://reference.aspose.org/cells/typescript/)
- [Free Support](https://forum.aspose.org/)
- [Contribution](https://contribution.aspose.org/)
- [Blog](https://blog.aspose.org/)
- [New Releases](https://releases.aspose.org/)