@univerjs-proexchange-clientindexinterfacesIexchangeoperateservice

@univerjs-pro/exchange-client v0.5.0-beta.1Docs


Interface: IExchangeOperateService

Properties

PropertyTypeDescriptionDefined in
progress$Observable<IUploadProgress>Observable of upload progresspackages/exchange-client/src/services/operate.service.ts:84

Methods

exportDOCXBySnapshot()

exportDOCXBySnapshot(): Promise<void>

Export docx file by snapshot

Returns

Promise<void>

Defined in

packages/exchange-client/src/services/operate.service.ts:67


exportDOCXByUnitId()

exportDOCXByUnitId(
   unitId?, 
   unitName?, 
unitType?): Promise<void>

Export docx file by unitId

Parameters

ParameterType
unitId?string
unitName?string
unitType?UniverType

Returns

Promise<void>

Defined in

packages/exchange-client/src/services/operate.service.ts:61


exportXLSXBySnapshot()

exportXLSXBySnapshot(): Promise<void>

Export xlsx file by snapshot

Returns

Promise<void>

Defined in

packages/exchange-client/src/services/operate.service.ts:42


exportXLSXByUnitId()

exportXLSXByUnitId(
   unitId?, 
   unitName?, 
unitType?): Promise<void>

Export xlsx file by unitId

Parameters

ParameterType
unitId?string
unitName?string
unitType?UniverInstanceType

Returns

Promise<void>

Defined in

packages/exchange-client/src/services/operate.service.ts:36


importDOCXToSnapshot()

importDOCXToSnapshot(): Promise<void>

Upload docx file to server, get snapshot and refresh current doc

Returns

Promise<void>

Defined in

packages/exchange-client/src/services/operate.service.ts:55


importDOCXToUnitId()

importDOCXToUnitId(): Promise<undefined | string>

Upload file to server, get unitId and open unit

Returns

Promise<undefined | string>

Defined in

packages/exchange-client/src/services/operate.service.ts:49


importXLSXToSnapshot()

importXLSXToSnapshot(): Promise<void>

Upload xlsx file to server, get snapshot and refresh current sheet

Returns

Promise<void>

Defined in

packages/exchange-client/src/services/operate.service.ts:30


importXLSXToUnitId()

importXLSXToUnitId(): Promise<undefined | string>

Upload file to server, get unitId and open unit

Returns

Promise<undefined | string>

Defined in

packages/exchange-client/src/services/operate.service.ts:24


interrupt()

interrupt(): void

Returns

void

Defined in

packages/exchange-client/src/services/operate.service.ts:17


registerLink(getLink): void

Customize the imported Unit URL format according to the needs of your own scene

Parameters

ParameterType
getLink(unitId, univerType) => string

Returns

void

Defined in

packages/exchange-client/src/services/operate.service.ts:79


uploadFileToUnitId()

uploadFileToUnitId(types): Promise<undefined | {
  type: UniverType;
  unitId: string;
}>

Upload file, supports multiple types

Parameters

ParameterType
typesUniverType[]

Returns

Promise<undefined | { type: UniverType; unitId: string; }>

Defined in

packages/exchange-client/src/services/operate.service.ts:73