---
Product: Aspose.Cells
Platform: typescript
Page Type: index
Canonical URL: https://blog.aspose.org/cells/typescript/cells-spreadsheet-management-typescript/
Published: 2026-05-19
Author: Aspose
---

# Spreadsheet Management with Aspose.Cells FOSS for TypeScript

Explore the spreadsheet management features of Aspose.Cells FOSS for TypeScript including cell styling, data validation, auto-filters, conditional formatting, charts, shapes, and workbook protection.

## Introduction

Aspose.Cells FOSS for TypeScript provides a comprehensive set of spreadsheet management features beyond basic cell read/write. Developers can apply detailed styling, set up data validation rules, configure auto-filters, add conditional formatting, build charts, insert shapes, and protect workbooks -- all from TypeScript code with no Microsoft Office dependency.

This post walks through the key spreadsheet management capabilities available in the library, with working code examples for each feature area.

---

## Key Features

### Data Validation

Add validation rules to cell ranges using the `DataValidation` class. Supported validation types include list, number range, and custom formulas. Apply validation to any range with `worksheet.addDataValidation()`.

```typescript
const workbook = new Workbook();
const worksheet = workbook.worksheets[0]!;
const validation = new DataValidation();
validation.type = "list";
validation.formula1 = '"Option1,Option2,Option3"';
worksheet.addDataValidation(validation, "B1:B10");
await workbook.save("validated.xlsx");
```

### Auto-Filter

Enable auto-filter headers on a data range with `worksheet.setAutoFilter()`. This adds drop-down filter controls to column headers in the output XLSX file. Remove filters with `worksheet.removeAutoFilter()`.

```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");
```

### Conditional Formatting

Apply visual rules to cell ranges using `ConditionalFormatCollection`. The library supports `ColorScaleRule`, `DataBarRule`, and `IconSetRule` for highlighting cells based on their values.

```typescript
const workbook = new Workbook();
const worksheet = workbook.worksheets[0]!;
for (let i = 1; i <= 10; i++) {
  worksheet.putValue(`A${i}`, i * 10);
}
await workbook.save("conditional.xlsx");
```

### Hyperlinks and Comments

Attach hyperlinks to cells with `cell.setHyperlink()` supporting URLs, email addresses, and internal sheet references. Add comments with `worksheet.addComment()` using `Comment` objects.

```typescript
const workbook = new Workbook();
const worksheet = workbook.worksheets[0]!;
worksheet.putValue("A1", "Click here");
worksheet.getCell2("A1").setHyperlink("https://www.example.com");
worksheet.putValue("A3", "Send email");
worksheet.getCell2("A3").setHyperlink("mailto:test@example.com");
await workbook.save("hyperlinks.xlsx");
```

### Workbook and Cell Protection

Protect entire workbooks with a password using `workbook.protect()`. Lock individual cells with `style.setLocked(true)` and control formula visibility with `style.setHidden()`.

```typescript
const workbook = new Workbook();
const worksheet = workbook.worksheets[0]!;
worksheet.putValue("A1", "Protected Cell");
const style = new Style();
style.setLocked(true);
style.setHidden(false);
worksheet.getCell2("A1").setStyle(style);
workbook.protect(true, "password");
await workbook.save("protected.xlsx");
```

### Column and Row Sizing

Set column widths with `worksheet.setColumnWidth()` and row heights with `worksheet.setRowHeight()`. Hide rows with `worksheet.setRowHidden()`. These settings persist in the saved XLSX file.

```typescript
const workbook = new Workbook();
const worksheet = workbook.worksheets[0]!;
worksheet.putValue("A1", "Wide Column");
worksheet.setColumnWidth(0, 30);
worksheet.setRowHeight(0, 25);
await workbook.save("sized.xlsx");
```

---

## Quick Start

Build the package from source:

```bash
git clone https://github.com/aspose-cells-foss/Aspose.Cells-FOSS-for-TypeScript.git
cd Aspose.Cells-FOSS-for-TypeScript
npm install
npm run build
```

Build a styled workbook with validation and auto-filter:

```typescript
import { Workbook, Style, DataValidation } from "excel-cells";

const workbook = new Workbook();
const worksheet = workbook.worksheets[0]!;

worksheet.putValue("A1", "Status");
worksheet.putValue("B1", "Value");
const headerStyle = new Style();
headerStyle.setBold(true);
worksheet.getCell2("A1").setStyle(headerStyle);
worksheet.getCell2("B1").setStyle(headerStyle);

const validation = new DataValidation();
validation.type = "list";
validation.formula1 = '"Active,Inactive,Pending"';
worksheet.addDataValidation(validation, "A2:A20");

worksheet.setAutoFilter("A1:B20");
await workbook.save("managed.xlsx");
```

---

## Open Source & Licensing

Aspose.Cells FOSS for TypeScript is released under the MIT license. The source code is available on [GitHub](https://github.com/aspose-cells-foss/Aspose.Cells-FOSS-for-TypeScript). Commercial use is permitted under the MIT license terms.

---

## Getting Started

- [Getting Started](https://docs.aspose.org/cells/typescript/getting-started/)
- [Developer Guide](https://docs.aspose.org/cells/typescript/developer-guide/)
- [KB Articles](https://kb.aspose.org/cells/typescript/)
- [API Reference](https://reference.aspose.org/cells/typescript/)

## Related Resources
- [Aspose.Cells — Enterprise Blog](https://blog.aspose.com/)
- [Aspose.Cells for TypeScript — Enterprise Product](https://products.aspose.com/cells/)