Import and Export Service
The Flow of Import
- Upload file to object storage, get
fileID
in response. - Call import api with
fileID
parameter andoutputType
(1 output unit file; 2 output to json data), then gettaskID
in response. - Polling to get async exchange task result, get
status
in response:pending
: need to continue polling againt.done
: exchange success, can getimport.jsonID
orimport.unitID
in reponse.failed
: exchange failed, can geterror.message
for infomation.
- If you want to get json data instead unit file, use
import.jsonID
to get exchange result by call get file api. Note that you need to convert the json data before using it in Univer.

The Flow of Export
- Call export api with
unitID
parameter, gettaskID
in response. - Polling to get async exchange task result, get
status
in response:pending
: need to continue polling againt.done
: exchange success, can getexport.fileID
in reponse.failed
: exchange failed, can geterror.message
for infomation.
- Use
export.fileID
to get exchange result by call get file api.

API
A import demo: https://github.com/dream-num/usip-example/tree/main/import
Last updated on