> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> [!NOTE]
>
> The Excel packages are in private preview with alpha customers. [Contact us](https://reducto.ai/contact?source=docs_office_xlsx) to get access.

Edit, recalculate and render `.xlsx` workbooks in Node and the browser, without Microsoft Excel, LibreOffice or a server.

## What you can do

* **Edit a workbook with a JS API.** `ExcelWorkbook` is Office.js-like: it follows the names in the Office JavaScript API for worksheets, ranges, formats, tables and charts. See [Concepts](https://docs.reducto.ai/office/xlsx/js-api/concepts.md).
* **Calculate formulas.** The formula engine recalculates what an edit changes. Read a cell and you get the new value. See [Recalculation](https://docs.reducto.ai/office/xlsx/rendering/recalculation.md).
* **Export PDF or PNG.** One page or one image for each sheet, or one range. PDF is in Node only. A PNG of a range works in the browser too. See [PDF](https://docs.reducto.ai/office/xlsx/rendering/pdf.md) and [PNG](https://docs.reducto.ai/office/xlsx/rendering/png.md).
* **Show a workbook in a page.** A canvas grid with charts, pictures and the sheet tabs. See [View](https://docs.reducto.ai/office/xlsx/rendering/view.md).
* **Add a spreadsheet editor to your app.** `@reductoai/xlsx-editor` gives the Home tab, the editable grid, and windows and menus that work like those in Microsoft Excel, in one mount call. See [Editor](https://docs.reducto.ai/office/xlsx/ui/editor.md).

Open and save are lossless: parts the library does not change are written back as they were read, and only edited sheets are rewritten.

## Example

```ts theme={null}
import { ExcelWorkbook } from "@reductoai/xlsx/node";

const book = await ExcelWorkbook.open("model.xlsx");
const sheet = book.worksheets.getItem("Sheet1");
sheet.getRange("A1:B2").values = [
  [1, 2],
  [3, 4],
];
sheet.getRange("C1").formulas = [["=SUM(A1:B2)"]];
sheet.getRange("A1:C1").format.font.bold = true;
console.log(sheet.getRange("C1").values); // [[10]]
await book.save("model.edited.xlsx");
await book.toPdf("model.pdf");
```

## Packages

| Package | What it is |
| - | - |
| `@reductoai/xlsx` | The workbook model, formula engine, JS API, canvas grid and headless editor |
| `@reductoai/xlsx-editor` | The spreadsheet editor UI for the browser, with a React wrapper |
| `@reductoai/portable-fonts` | Open fonts with Office font metrics; used to measure and paint text |

## Entry points

| Import | Use it for |
| - | - |
| `@reductoai/xlsx` | `Workbook` and `Worksheet`: cell values and formulas by row and column, and the formula engine (`calc`) |
| `@reductoai/xlsx/officejs` | `ExcelWorkbook`, the JS API. Works in Node and in the browser |
| `@reductoai/xlsx/node` | `ExcelWorkbook` with file paths: `open`, `save`, `toPdf`, `toPng` |
| `@reductoai/xlsx/view` | The canvas grid, charts and `previewWorkbook` (browser) |
| `@reductoai/xlsx/editor` | `XlsxEditor`, the headless editor: Home-tab commands, undo and the context menu |
| `@reductoai/xlsx/blank` | `blankWorkbookBytes()`: the bytes of an empty workbook |

## Not supported

* 3D references (`Sheet1:Sheet3!A1`)
* Add-in functions and external references keep their cached values
* `FORECAST.ETS` and its forms
* Functions that need a server: `CUBE*`, `WEBSERVICE`, `STOCKHISTORY`, `RTD`, `IMAGE` and `TRANSLATE` give `#NAME?`
* Pivot refresh with ungrouped dates or calculated fields
* Flash Fill, and Paste Special other than Paste Values
