---
title: "SheetJSON spreadsheet format in Document Authoring"
canonical_url: "https://www.nutrient.io/guides/document-authoring/spreadsheets/sheetjson/"
md_url: "https://www.nutrient.io/guides/document-authoring/spreadsheets/sheetjson.md"
last_updated: "2026-10-14T00:00:00.000Z"
description: "SheetJSON is the native format Document Authoring uses to save and load spreadsheets."
---

# Spreadsheet JSON support with SheetJSON

Document Authoring uses SheetJSON as its native spreadsheet format. SheetJSON is the spreadsheet counterpart of [DocJSON](https://www.nutrient.io/guides/document-authoring/working-with-documents/docjson.md). It stores supported XLSX data as plain JSON.

Saving a spreadsheet as SheetJSON and loading it again preserves all supported data. Use SheetJSON as your working copy, and export to XLSX only when another app needs the spreadsheet.

Store and load SheetJSON, but don’t read or change its contents in your code.

Before you start, install and run the Document Authoring library. For setup instructions, refer to the [getting started](https://www.nutrient.io/guides/document-authoring/spreadsheets/getting-started.md) guide.

## Working with SheetJSON in the editor

The examples omit error handling. Add error handling before you use this code in production.

### Loading SheetJSON

Call [`DocAuthSystem.loadSpreadsheet`](https://www.nutrient.io/api/document-authoring/types/docauthsystem/#loadspreadsheet) to load SheetJSON:

```js

// Assuming the `system` instance exists.

const spreadsheet = await system.loadSpreadsheet(fetch('./spreadsheet.json'));

const editor = await system.createSpreadsheetEditor(
  document.getElementById('editor'),
  { spreadsheet },
);

```

Pass a `Response`, `Blob`, or bytes instead of a parsed object. Document Authoring reads large spreadsheets from these inputs in parts, but a parsed object must fit in memory.

### Saving SheetJSON

Call [`DocAuthSpreadsheet.saveSpreadsheet`](https://www.nutrient.io/api/document-authoring/types/docauthspreadsheet/#savespreadsheet) or [`DocAuthSpreadsheet.saveSpreadsheetJSONString`](https://www.nutrient.io/api/document-authoring/types/docauthspreadsheet/#savespreadsheetjsonstring) to save SheetJSON:

```js

// Assuming the `editor` instance exists.

const currentSpreadsheet = editor.currentSpreadsheet();

const blob = await currentSpreadsheet.saveSpreadsheet();
console.log('Blob', blob);

const sheetJSON = await currentSpreadsheet.saveSpreadsheetJSONString();
console.log('JSON string', sheetJSON);

```

`saveSpreadsheet()` works for spreadsheets of any size. `saveSpreadsheetJSONString()` returns an empty string when the spreadsheet is too large for a JavaScript string.

## Example

This example shows a minimal valid SheetJSON spreadsheet for the current format version. It contains one sheet named `Sheet1` and the number `42` in cell A1:

```json

{
  "type": "https://pspdfkit.com/document-authoring/persistence/spreadsheet",
  "version": 0,
  "spreadsheet": {
    "sheets": [
      {
        "name": "Sheet1",
        "sheetId": 1,
        "rows": [
          {
            "row": 1,
            "cells": [
              {
                "type": "number",
                "col": 1,
                "v": 42
              }
            ]
          }
        ]
      }
    ]
  }
}

```

Rows and columns start at 1. Rows and cells are sparse, so SheetJSON writes only those with values or formatting.

## Exploring more

To export a spreadsheet to XLSX or PDF, refer to the [save and export spreadsheets](https://www.nutrient.io/guides/document-authoring/spreadsheets/save-and-export.md) guide.

If you need more SheetJSON format details, [contact Sales](https://www.nutrient.io/contact-sales/).
---

## Related pages

- [Spreadsheets](/guides/document-authoring/spreadsheets.md)
- [Spreadsheet editor](/guides/document-authoring/spreadsheets/editor.md)
- [Spreadsheet formulas](/guides/document-authoring/spreadsheets/formulas.md)
- [Get started with spreadsheets](/guides/document-authoring/spreadsheets/getting-started.md)
- [Import and load spreadsheets](/guides/document-authoring/spreadsheets/import-and-load.md)
- [Spreadsheets in Node.js](/guides/document-authoring/spreadsheets/nodejs.md)
- [Save and export spreadsheets](/guides/document-authoring/spreadsheets/save-and-export.md)

