Univer
Univer Sheet
Self-hosted Backend Service
Import And Export

Import And Export

Import flowchart

  1. Upload file to object storage, get fileID in response.

  2. Call import api with fileID parameter and outputType(1 output unit file; 2 output to json data), then get taskID in response.

  3. Polling to get async exchange task result, get status in response:

    • pending: need to continue polling againt.
    • done: exchange success, can get import.jsonID or import.unitID in reponse.
    • failed: exchange failed, can get error.message for infomation.
  4. If you want to get json data instead unit file, use import.jsonID to get exchange result by call get file api.

import

Export flowchart

  1. Call export api with unitID parameter, get taskID in response.
  2. Polling to get async exchange task result, get status in response:
    • pending: need to continue polling againt.
    • done: exchange success, can get export.fileID in reponse.
    • failed: exchange failed, can get error.message for infomation.
  3. Use export.fileID to get exchange result by call get file api.
export

Api

see Univer server API

A import demo: https://github.com/dream-num/usip-example/tree/main/import (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.