@univerjs-pro/exchange-client v0.5.4


Class: ExchangeService

Defined in: packages/exchange-client/src/services/exchange.service.ts:83

Extends

Implements

Constructors

new ExchangeService()

new ExchangeService(_configService, _requestService): ExchangeService

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

Parameters

ParameterType
_configServiceIConfigService
_requestServiceRequestService

Returns

ExchangeService

Overrides

Disposable.constructor

Properties

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

Methods

dispose()

dispose(): void

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

Returns

void

Implementation of

IDisposable.dispose

Overrides

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


exportDOCXBySnapshot()

exportDOCXBySnapshot(snapshot): Promise<undefined | File>

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

Export DOCX file by document data

Parameters

ParameterType
snapshotIDocumentData

Returns

Promise<undefined | File>

Implementation of

IExchangeService.exportDOCXBySnapshot


exportDOCXByUnitId()

exportDOCXByUnitId(unitId): Promise<undefined | File>

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

Export DOCX file by unit id

Parameters

ParameterType
unitIdstring

Returns

Promise<undefined | File>

Implementation of

IExchangeService.exportDOCXByUnitId


exportXLSXBySnapshot()

exportXLSXBySnapshot(data): Promise<undefined | File>

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

Export XLSX file by workbook data

Parameters

ParameterType
dataIWorkbookData

Returns

Promise<undefined | File>

Implementation of

IExchangeService.exportXLSXBySnapshot


exportXLSXByUnitId()

exportXLSXByUnitId(unitId): Promise<undefined | File>

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

Export XLSX file by unit id

Parameters

ParameterType
unitIdstring

Returns

Promise<undefined | File>

Implementation of

IExchangeService.exportXLSXByUnitId


importDOCXToSnapshot()

importDOCXToSnapshot(file): Promise<
  | undefined
| IDocumentData>

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

Import DOCX file to document data

Parameters

ParameterType
filestring | File

Returns

Promise< | undefined | IDocumentData>

Implementation of

IExchangeService.importDOCXToSnapshot


importFileToUnitId()

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

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

Import file to unit id

Parameters

ParameterType
filestring | File
univerTypeUniverType

Returns

Promise<undefined | string>

Implementation of

IExchangeService.importFileToUnitId


importXLSXToSnapshot()

importXLSXToSnapshot(file): Promise<
  | undefined
| IWorkbookData>

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

Import XLSX file to workbook data

Parameters

ParameterType
filestring | File

Returns

Promise< | undefined | IWorkbookData>

Implementation of

IExchangeService.importXLSXToSnapshot