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


Class: ExchangeService

Extends

Implements

Constructors

new ExchangeService()

new ExchangeService(_configService, _requestService): ExchangeService

Parameters

ParameterType
_configServiceIConfigService
_requestServiceRequestService

Returns

ExchangeService

Overrides

Disposable.constructor

Defined in

packages/exchange-client/src/services/exchange.service.ts:88

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
requestState$readonlyObservable<IRequestState>undefined-packages/exchange-client/src/services/exchange.service.ts:86

Methods

dispose()

dispose(): void

Returns

void

Implementation of

IDisposable.dispose

Overrides

Disposable.dispose

Defined in

packages/exchange-client/src/services/exchange.service.ts:95


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


exportDOCXBySnapshot()

exportDOCXBySnapshot(snapshot): Promise<undefined | File>

Export DOCX file by document data

Parameters

ParameterType
snapshotIDocumentData

Returns

Promise<undefined | File>

Implementation of

IExchangeService.exportDOCXBySnapshot

Defined in

packages/exchange-client/src/services/exchange.service.ts:116


exportDOCXByUnitId()

exportDOCXByUnitId(unitId): Promise<undefined | File>

Export DOCX file by unit id

Parameters

ParameterType
unitIdstring

Returns

Promise<undefined | File>

Implementation of

IExchangeService.exportDOCXByUnitId

Defined in

packages/exchange-client/src/services/exchange.service.ts:112


exportXLSXBySnapshot()

exportXLSXBySnapshot(data): Promise<undefined | File>

Export XLSX file by workbook data

Parameters

ParameterType
dataIWorkbookData

Returns

Promise<undefined | File>

Implementation of

IExchangeService.exportXLSXBySnapshot

Defined in

packages/exchange-client/src/services/exchange.service.ts:147


exportXLSXByUnitId()

exportXLSXByUnitId(unitId): Promise<undefined | File>

Export XLSX file by unit id

Parameters

ParameterType
unitIdstring

Returns

Promise<undefined | File>

Implementation of

IExchangeService.exportXLSXByUnitId

Defined in

packages/exchange-client/src/services/exchange.service.ts:143


importDOCXToSnapshot()

importDOCXToSnapshot(file): Promise<undefined | IDocumentData>

Import DOCX file to document data

Parameters

ParameterType
filestring | File

Returns

Promise<undefined | IDocumentData>

Implementation of

IExchangeService.importDOCXToSnapshot

Defined in

packages/exchange-client/src/services/exchange.service.ts:100


importFileToUnitId()

importFileToUnitId(file, univerType): Promise<undefined | string>

Import file to unit id

Parameters

ParameterType
filestring | File
univerTypeUniverType

Returns

Promise<undefined | string>

Implementation of

IExchangeService.importFileToUnitId

Defined in

packages/exchange-client/src/services/exchange.service.ts:152


importXLSXToSnapshot()

importXLSXToSnapshot(file): Promise<undefined | IWorkbookData>

Import XLSX file to workbook data

Parameters

ParameterType
filestring | File

Returns

Promise<undefined | IWorkbookData>

Implementation of

IExchangeService.importXLSXToSnapshot

Defined in

packages/exchange-client/src/services/exchange.service.ts:120