@mescius/spread-sheets 17.1.2 → 17.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +44 -1
- package/dist/gc.spread.sheets.all.min.js +4 -4
- package/dist/gc.spread.sheets.d.ts +83 -20
- package/package.json +1 -1
@@ -12893,6 +12893,34 @@ declare module GC{
|
|
12893
12893
|
}
|
12894
12894
|
|
12895
12895
|
|
12896
|
+
export interface IDeserializationOptions{
|
12897
|
+
/**
|
12898
|
+
* Whether to ignore the style when converting json to the workbook.
|
12899
|
+
*/
|
12900
|
+
ignoreStyle?: boolean;
|
12901
|
+
/**
|
12902
|
+
* Whether to ignore the formula when converting json to the workbook.
|
12903
|
+
*/
|
12904
|
+
ignoreFormula?: boolean;
|
12905
|
+
/**
|
12906
|
+
* Whether to treat the frozen columns as row headers when converting json to the workbook.
|
12907
|
+
*/
|
12908
|
+
frozenColumnsAsRowHeaders?: boolean;
|
12909
|
+
/**
|
12910
|
+
* Whether to treat the frozen rows as column headers when converting json to the workbook.
|
12911
|
+
*/
|
12912
|
+
frozenRowsAsColumnHeaders?: boolean;
|
12913
|
+
/**
|
12914
|
+
* Whether to prevent recalculation after loading the json data.
|
12915
|
+
*/
|
12916
|
+
doNotRecalculateAfterLoad?: boolean;
|
12917
|
+
/**
|
12918
|
+
* Whether to use the incremental loading or the callbacks of incremental loading when converting json to the workbook.
|
12919
|
+
*/
|
12920
|
+
incrementalLoading?: boolean | GC.Spread.Sheets.IIncrementalLoadingOptions;
|
12921
|
+
}
|
12922
|
+
|
12923
|
+
|
12896
12924
|
export interface IDirtyCellInfo{
|
12897
12925
|
row: number;
|
12898
12926
|
col: number;
|
@@ -13241,6 +13269,18 @@ declare module GC{
|
|
13241
13269
|
}
|
13242
13270
|
|
13243
13271
|
|
13272
|
+
export interface IIncrementalLoadingOptions{
|
13273
|
+
/**
|
13274
|
+
* The callback when of the incremental loading finished.
|
13275
|
+
*/
|
13276
|
+
loaded?: () => void;
|
13277
|
+
/**
|
13278
|
+
* The callback when of the incremental loading progress.
|
13279
|
+
*/
|
13280
|
+
loading?: (progress: number, args: { sheet: GC.Spread.Sheets.Worksheet }) => void;
|
13281
|
+
}
|
13282
|
+
|
13283
|
+
|
13244
13284
|
export interface IInvalidOperationEventArgs{
|
13245
13285
|
sheet: GC.Spread.Sheets.Worksheet;
|
13246
13286
|
sheetName: string;
|
@@ -13622,6 +13662,42 @@ declare module GC{
|
|
13622
13662
|
}
|
13623
13663
|
|
13624
13664
|
|
13665
|
+
export interface ISerializationOption{
|
13666
|
+
/**
|
13667
|
+
* Whether to include the binding source when converting the workbook to json.
|
13668
|
+
*/
|
13669
|
+
includeBindingSource?: boolean;
|
13670
|
+
/**
|
13671
|
+
* Whether to ignore the style when converting the workbook to json.
|
13672
|
+
*/
|
13673
|
+
ignoreStyle?: boolean;
|
13674
|
+
/**
|
13675
|
+
* Whether to ignore the formula when converting the workbook to json.
|
13676
|
+
*/
|
13677
|
+
ignoreFormula?: boolean;
|
13678
|
+
/**
|
13679
|
+
* Whether to apply the format string to exporting value when converting the workbook to json, default false.
|
13680
|
+
*/
|
13681
|
+
saveAsView?: boolean;
|
13682
|
+
/**
|
13683
|
+
* Whether to treat the row headers as frozen columns when converting the workbook to json.
|
13684
|
+
*/
|
13685
|
+
rowHeadersAsFrozenColumns?: boolean;
|
13686
|
+
/**
|
13687
|
+
* Whether to treat the column headers as frozen rows when converting the workbook to json.
|
13688
|
+
*/
|
13689
|
+
columnHeadersAsFrozenRows?: boolean;
|
13690
|
+
/**
|
13691
|
+
* Whether to include the automatically merged cells when converting the workbook to json.
|
13692
|
+
*/
|
13693
|
+
includeAutoMergedCells?: boolean;
|
13694
|
+
/**
|
13695
|
+
* Whether to save the r1c1 formula in the file.
|
13696
|
+
*/
|
13697
|
+
saveR1C1Formula?: boolean;
|
13698
|
+
}
|
13699
|
+
|
13700
|
+
|
13625
13701
|
export interface ISetBorderOptions{
|
13626
13702
|
all?: boolean;
|
13627
13703
|
left?: boolean;
|
@@ -14483,6 +14559,7 @@ declare module GC{
|
|
14483
14559
|
* @property {boolean} [includeAutoMergedCells] - Whether to include the automatically merged cells when do save, default false.
|
14484
14560
|
* @property {boolean} [includeCalcModelCache] - [deprecated] Whether to include the extra data of calculation. Can be faster when open the file with those data, default false.
|
14485
14561
|
* @property {boolean} [includeUnusedNames] - Whether to include the unused custom name when do save, default true.
|
14562
|
+
* @property {boolean} [exportSharedFormula] - Whether to include the shared formula when do save, default true.
|
14486
14563
|
* @property {boolean} [includeEmptyRegionCells] - Whether to include any empty cells(cells with no data or only style) outside the used data range, default true.
|
14487
14564
|
* @property {string} [password] - Set the password to open the workbook.
|
14488
14565
|
*/
|
@@ -14495,6 +14572,7 @@ declare module GC{
|
|
14495
14572
|
rowHeadersAsFrozenColumns?: boolean;
|
14496
14573
|
columnHeadersAsFrozenRows?: boolean;
|
14497
14574
|
includeUnusedNames?: boolean;
|
14575
|
+
exportSharedFormula?: boolean;
|
14498
14576
|
includeEmptyRegionCells?: boolean;
|
14499
14577
|
includeAutoMergedCells?: boolean;
|
14500
14578
|
includeCalcModelCache?: boolean;
|
@@ -22833,15 +22911,7 @@ declare module GC{
|
|
22833
22911
|
/**
|
22834
22912
|
* Loads the object state from the specified JSON string.
|
22835
22913
|
* @param {Object} workbookData The spreadsheet data from deserialization.
|
22836
|
-
* @param {
|
22837
|
-
* @param {boolean} [deserializationOptions.ignoreStyle] - Whether to ignore the style when converting json to the workbook.
|
22838
|
-
* @param {boolean} [deserializationOptions.ignoreFormula] - Whether to ignore the formula when converting json to the workbook.
|
22839
|
-
* @param {boolean} [deserializationOptions.frozenColumnsAsRowHeaders] - Whether to treat the frozen columns as row headers when converting json to the workbook.
|
22840
|
-
* @param {boolean} [deserializationOptions.frozenRowsAsColumnHeaders] - Whether to treat the frozen rows as column headers when converting json to the workbook.
|
22841
|
-
* @param {boolean} [deserializationOptions.doNotRecalculateAfterLoad] - Whether to prevent recalculation after loading the json data.
|
22842
|
-
* @param {boolean | object} [deserializationOptions.incrementalLoading] - Whether to use the incremental loading or the callbacks of incremental loading when converting json to the workbook.
|
22843
|
-
* @param {function} [deserializationOptions.incrementalLoading.loading] - The callback when of the incremental loading progress.
|
22844
|
-
* @param {function} [deserializationOptions.incrementalLoading.loaded] - The callback when of the incremental loading finished.
|
22914
|
+
* @param {GC.Spread.Sheets.IDeserializationOptions} [deserializationOptions] - The deserialization options.
|
22845
22915
|
* @returns {Promise} - The fromJSON promise.
|
22846
22916
|
* @example
|
22847
22917
|
* ```
|
@@ -22857,7 +22927,7 @@ declare module GC{
|
|
22857
22927
|
* });
|
22858
22928
|
* ```
|
22859
22929
|
*/
|
22860
|
-
fromJSON(workbookData: Object, deserializationOptions?:
|
22930
|
+
fromJSON(workbookData: Object, deserializationOptions?: GC.Spread.Sheets.IDeserializationOptions): Promise<any>;
|
22861
22931
|
/**
|
22862
22932
|
* Gets the active sheet.
|
22863
22933
|
* @returns {GC.Spread.Sheets.Worksheet} The active sheet instance.
|
@@ -23427,15 +23497,8 @@ declare module GC{
|
|
23427
23497
|
suspendPaint(): void;
|
23428
23498
|
/**
|
23429
23499
|
* Saves the object state to a JSON string.
|
23430
|
-
* @param {
|
23431
|
-
* @
|
23432
|
-
* @param {boolean} [serializationOption.ignoreStyle] - Whether to ignore the style when converting the workbook to json.
|
23433
|
-
* @param {boolean} [serializationOption.ignoreFormula] - Whether to ignore the formula when converting the workbook to json.
|
23434
|
-
* @param {boolean} [serializationOption.saveAsView] - Whether to apply the format string to exporting value when converting the workbook to json, default false.
|
23435
|
-
* @param {boolean} [serializationOption.rowHeadersAsFrozenColumns] - Whether to treat the row headers as frozen columns when converting the workbook to json.
|
23436
|
-
* @param {boolean} [serializationOption.columnHeadersAsFrozenRows] - Whether to treat the column headers as frozen rows when converting the workbook to json.
|
23437
|
-
* @param {boolean} [serializationOption.includeAutoMergedCells] - Whether to include the automatically merged cells when converting the workbook to json. * @returns {Object} The spreadsheet data.
|
23438
|
-
* @param {boolean} [serializationOption.saveR1C1Formula] - Whether to save the r1c1 formula in the file.
|
23500
|
+
* @param {GC.Spread.Sheets.ISerializationOption} serializationOption - The serialization options.
|
23501
|
+
* @returns {Object} The spreadsheet data.
|
23439
23502
|
* @example
|
23440
23503
|
* ```
|
23441
23504
|
* activeSheet.getCell(0,0).value(123);
|
@@ -23447,7 +23510,7 @@ declare module GC{
|
|
23447
23510
|
* alert(jsonStr);
|
23448
23511
|
* ```
|
23449
23512
|
*/
|
23450
|
-
toJSON(serializationOption?:
|
23513
|
+
toJSON(serializationOption?: GC.Spread.Sheets.ISerializationOption): Object;
|
23451
23514
|
/**
|
23452
23515
|
* Removes the binding of an event to Workbook.
|
23453
23516
|
* @param {string} type The event type.
|