@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
Parameter | Type |
---|---|
_univerInstanceService | IUniverInstanceService |
_messageService | IMessageService |
_localeService | LocaleService |
_exchangeService | ExchangeService |
_uploadNotificationService | UploadNotificationService |
_logService | ILogService |
Returns
Overrides
Defined in
packages/exchange-client/src/services/operate.service.ts:109
Properties
Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
---|---|---|---|---|---|---|
_disposed | protected | boolean | false | - | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
_logService | readonly | ILogService | undefined | - | - | packages/exchange-client/src/services/operate.service.ts:115 |
progress$ | readonly | Observable <IUploadProgress > | undefined | Observable of upload progress | - | packages/exchange-client/src/services/operate.service.ts:103 |
Methods
dispose()
dispose(): void
Returns
void
Implementation of
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:106
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
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
Parameter | Type |
---|---|
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
Parameter | Type |
---|---|
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()
registerLink(getLink): void
Customize the imported Unit URL format according to the needs of your own scene
Parameters
Parameter | Type |
---|---|
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
Parameter | Type |
---|---|
types | UniverType [] |
Returns
Promise
<undefined
| {
type
: UniverType
;
unitId
: string
;
}>
Implementation of
IExchangeOperateService
.uploadFileToUnitId
Defined in
packages/exchange-client/src/services/operate.service.ts:135