File exchange integration

Add file import and export to your Univer application, with or without collaborative editing.

To open an Excel file in Univer, first convert it into data the editor can read. To export it, convert the edited data back into an Excel file. The server-side @univerjs-pro/exchange-node module handles conversion; the browser uploads files, opens documents, and downloads results.

100%

Without collaborative editing

For example, a user uploads an Excel file, edits it on the page, and downloads the result as Excel.

  1. The browser uploads the file. The server converts it into Univer document data and returns it.
  2. The browser opens a spreadsheet with that data, ready for editing.
  3. On export, the browser sends the edited data to the server, which generates an Excel file for download.

This does not require a collaboration service. A snapshot in the browser APIs is the document data used here. Snapshot import and export still need server-side conversion. To let users save their work and return later, your application also needs to store that data.

See Office file import and export for installing and using the conversion module. Start there as well if you only need to process files in Node.js.

With collaborative editing

For example, a user imports an Excel file, shares the document with colleagues, edits it together with them, and exports it later.

  1. The server converts the uploaded file and saves the result as a collaborative document.
  2. The server returns a document ID. The browser opens that ID, and other users join the same document using it.
  3. On export, the server reads the document's latest content and generates an Excel file for download.

The unitId in the browser APIs is this document ID. Complete Collaboration integration first, then run the Exchange example. It includes browser, server, and conversion code to follow together.

Wait for current edits to synchronize before exporting, or the file may omit recent changes. See the server-side Office Exchange section of extension modules for reading and converting collaborative documents.

Connect the import and export buttons

Once server-side conversion works, connect it to your page:

  • Using Univer menus or Facade APIs: follow the Exchange example to implement the required upload, conversion, task-query, and download interfaces, then configure the browser plugins. Request addresses and response formats must match.
  • Using your own buttons: call your application APIs. Open the returned document data or document ID after import, and download the generated file after export.

See Sheets, Docs, Slides, Boards, Bases, and PDFs for browser configuration. The collaboration example demonstrates Sheets. For other products, check Office file import and export and the formats supported by your release.

Check the integration

Import a real application file, edit it, and export it. Open the result in an Office application and check the edits, formulas, images, and layout. With collaboration, also check that other users can open the same document and that its content survives a server restart.

Before deployment, replace the example's temporary files and in-memory tasks with application storage, limit upload sizes, and handle conversion failures and timeouts. Uploads, task queries, and downloads need access checks; see identity and authorization.

How is this guide?

© 2026 DreamNum Co., Ltd.