Référence de l’API

@univerjs-pro/exchange-client

Cette page API est actuellement disponible en anglais. Les signatures et identifiants restent identiques dans toutes les langues.

Shared import and export client integration for Web SDK units.

TypeScript
import { UniverExchangeClientPlugin } from '@univerjs-pro/exchange-client'univer.registerPlugin(UniverExchangeClientPlugin, config)

Entry Points

  • Facade: @univerjs-pro/exchange-client/facade

Facade Utilities

Import the Facade entry and call exchange utilities through univerAPI:

TypeScript
import '@univerjs-pro/exchange-client/facade'if (file) univerAPI.downloadFile(file, 'univer', 'xlsx')

The shared Facade entry only adds downloadFile(file, filename, fileExt). Import, export, and snapshot conversion methods live in the corresponding host package Facade: bases-exchange-client, boards-exchange-client, docs-exchange-client, pdfs-exchange-client, sheets-exchange-client, or slides-exchange-client.

Plugin configuration

TypeScript
interface IExchangeClientPluginConfig {  /**   * The URL of the endpoint for downloading files.   * @default 'location.origin'   */  downloadEndpointUrl?: string  uploadFileServerUrl?: string  importServerUrl?: string  exportServerUrl?: string  getTaskServerUrl?: string  signUrlServerUrl?: string  maxTimeoutTime?: number}

Request options

TypeScript
export interface IExchangeImportOptions {  sheet?: IExchangeSheetImportOption  base?: IExchangeBaseImportOption}export interface IExchangeExportOptions {  sheet?: IExchangeSheetExportOption  base?: IExchangeBaseExportOption}

IImportRequest.options and IExportRequest.options now group format-specific settings by unit kind. Base requests use ExchangeBaseImportMode, ExchangeBaseExportMode, and ExchangeBaseFormulaPolicy. ExchangeFormat supports xlsx, csv, tsv, docx, pptx, and pdf.

Que pensez-vous de ce guide ?

© 2026 DreamNum Co., Ltd.