@univerjs-proexchange-clientindexclassesExchangeoperateservice

@univerjs-pro/exchange-client v0.5.4


Class: ExchangeOperateService

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

Extends

Implements

Constructors

new ExchangeOperateService()

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

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

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService
_messageServiceIMessageService
_localeServiceLocaleService
_exchangeServiceExchangeService
_uploadNotificationServiceUploadNotificationService
_logServiceILogService

Returns

ExchangeOperateService

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-Disposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
_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

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

Returns

void

Implementation of

IDisposable.dispose

Inherited from

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

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

Export docx file by snapshot

Returns

Promise<void>

Implementation of

IExchangeOperateService.exportDOCXBySnapshot


exportDOCXByUnitId()

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

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

Export docx file by unitId

Parameters

ParameterType
unitId?string
unitName?string
unitType?UniverInstanceType

Returns

Promise<void>

Implementation of

IExchangeOperateService.exportDOCXByUnitId


exportXLSXBySnapshot()

exportXLSXBySnapshot(): Promise<void>

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

Export xlsx file by snapshot

Returns

Promise<void>

Implementation of

IExchangeOperateService.exportXLSXBySnapshot


exportXLSXByUnitId()

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

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

Export xlsx file by unitId

Parameters

ParameterType
unitId?string
unitName?string

Returns

Promise<void>

Implementation of

IExchangeOperateService.exportXLSXByUnitId


importDOCXToSnapshot()

importDOCXToSnapshot(): Promise<void>

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

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

Returns

Promise<void>

Implementation of

IExchangeOperateService.importDOCXToSnapshot


importDOCXToUnitId()

importDOCXToUnitId(): Promise<undefined | string>

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

Upload file to server, get unitId and open unit

Returns

Promise<undefined | string>

Implementation of

IExchangeOperateService.importDOCXToUnitId


importXLSXToSnapshot()

importXLSXToSnapshot(): Promise<void>

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

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

Returns

Promise<void>

Implementation of

IExchangeOperateService.importXLSXToSnapshot


importXLSXToUnitId()

importXLSXToUnitId(): Promise<undefined | string>

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

Upload file to server, get unitId and open unit

Returns

Promise<undefined | string>

Implementation of

IExchangeOperateService.importXLSXToUnitId


interrupt()

interrupt(): void

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

Returns

void

Implementation of

IExchangeOperateService.interrupt


registerLink(getLink): void

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

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


uploadFileToUnitId()

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

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

Upload file, supports multiple types

Parameters

ParameterType
typesUniverType[]

Returns

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

Implementation of

IExchangeOperateService.uploadFileToUnitId