@univerjs-pro/exchange-client

GitHubEdit on GitHub

Workbook import and export client integration for Univer Pro.

import { UniverExchangeClientPlugin } from '@univerjs-pro/exchange-client'

univer.registerPlugin(UniverExchangeClientPlugin, IUniverExchangeClientConfig)

IUniverExchangeClientConfig

export interface IUniverExchangeClientConfig {
  /**
   * 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
  options?: IUniverExchangeClientOptions
}

IUniverExchangeClientOptions

export interface IUniverExchangeClientOptions {
  /**
   * The minimum number of rows in the worksheet after import.
   */
  minSheetRowCount?: number

  /**
   * The minimum number of columns in the worksheet after import.
   */
  minSheetColumnCount?: number

  /**
   * Export whether to enable server-side formula computing.
   */
  enableServerSideComputing?: boolean

  /**
   * Whether to disable converting cell images to link on export.
   * If the cell image source is a URL, the default behavior is to convert the url to the cell value on export.
   * Because the server will download all the resource files, when there are many images, it will consume a lot of resources and take a long time.
   * @default true
   */
  disableCellImageConversion?: boolean

  /**
   * Whether to ignore Table when exporting.
   * @default false
   */
  ignoreTableExport?: boolean
}