@univerjs-proexchange-clientindexclassesExchangeoperateservice

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


Class: ExchangeOperateService

Extends

Implements

Constructors

new ExchangeOperateService()

new ExchangeOperateService(
   _univerInstanceService, 
   _messageService, 
   _localeService, 
   _exchangeService, 
   _uploadNotificationService, 
   _logService): ExchangeOperateService

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService
_messageServiceIMessageService
_localeServiceLocaleService
_exchangeServiceExchangeService
_uploadNotificationServiceUploadNotificationService
_logServiceILogService

Returns

ExchangeOperateService

Overrides

Disposable.constructor

Defined in

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

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-Disposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
_logServicereadonlyILogServiceundefined--packages/exchange-client/src/services/operate.service.ts:115
progress$readonlyObservable<IUploadProgress>undefinedObservable of upload progress-packages/exchange-client/src/services/operate.service.ts:103

Methods

dispose()

dispose(): void

Returns

void

Implementation of

IDisposable.dispose

Inherited from

Disposable.dispose

Defined in

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


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(): Promise<void>

Export docx file by snapshot

Returns

Promise<void>

Implementation of

IExchangeOperateService.exportDOCXBySnapshot

Defined in

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


exportDOCXByUnitId()

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

Export docx file by unitId

Parameters

ParameterType
unitId?string
unitName?string
unitType?UniverInstanceType

Returns

Promise<void>

Implementation of

IExchangeOperateService.exportDOCXByUnitId

Defined in

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


exportXLSXBySnapshot()

exportXLSXBySnapshot(): Promise<void>

Export xlsx file by snapshot

Returns

Promise<void>

Implementation of

IExchangeOperateService.exportXLSXBySnapshot

Defined in

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


exportXLSXByUnitId()

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

Export xlsx file by unitId

Parameters

ParameterType
unitId?string
unitName?string

Returns

Promise<void>

Implementation of

IExchangeOperateService.exportXLSXByUnitId

Defined in

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


importDOCXToSnapshot()

importDOCXToSnapshot(): Promise<void>

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

Returns

Promise<void>

Implementation of

IExchangeOperateService.importDOCXToSnapshot

Defined in

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


importDOCXToUnitId()

importDOCXToUnitId(): Promise<undefined | string>

Upload file to server, get unitId and open unit

Returns

Promise<undefined | string>

Implementation of

IExchangeOperateService.importDOCXToUnitId

Defined in

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


importXLSXToSnapshot()

importXLSXToSnapshot(): Promise<void>

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

Returns

Promise<void>

Implementation of

IExchangeOperateService.importXLSXToSnapshot

Defined in

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


importXLSXToUnitId()

importXLSXToUnitId(): Promise<undefined | string>

Upload file to server, get unitId and open unit

Returns

Promise<undefined | string>

Implementation of

IExchangeOperateService.importXLSXToUnitId

Defined in

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


interrupt()

interrupt(): void

Returns

void

Implementation of

IExchangeOperateService.interrupt

Defined in

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


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

Implementation of

IExchangeOperateService.registerLink

Defined in

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


uploadFileToUnitId()

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

Upload file, supports multiple types

Parameters

ParameterType
typesUniverType[]

Returns

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

Implementation of

IExchangeOperateService.uploadFileToUnitId

Defined in

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