@mescius/spread-sheets 17.0.7 → 17.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12934,6 +12934,14 @@ declare module GC{
12934
12934
  }
12935
12935
 
12936
12936
 
12937
+ export interface IRange{
12938
+ row: number;
12939
+ col: number;
12940
+ rowCount: number;
12941
+ colCount: number;
12942
+ }
12943
+
12944
+
12937
12945
  export interface IRangeChangedEventArgs{
12938
12946
  sheet: GC.Spread.Sheets.Worksheet;
12939
12947
  sheetName: string;
@@ -13884,7 +13892,7 @@ declare module GC{
13884
13892
  * @property {boolean} [rowHeadersAsFrozenColumns] - Whether to treat the row headers as frozen columns when do save, default false.
13885
13893
  * @property {boolean} [columnHeadersAsFrozenRows] - Whether to treat the column headers as frozen rows when do save, default false.
13886
13894
  * @property {boolean} [includeAutoMergedCells] - Whether to include the automatically merged cells when do save, default false.
13887
- * @property {boolean} [includeCalcModelCache] - Whether to include the extra data of calculation. Can be faster when open the file with those data, default false.
13895
+ * @property {boolean} [includeCalcModelCache] - [deprecated] Whether to include the extra data of calculation. Can be faster when open the file with those data, default false.
13888
13896
  * @property {boolean} [includeUnusedNames] - Whether to include the unused custom name when do save, default true.
13889
13897
  * @property {boolean} [includeEmptyRegionCells] - Whether to include any empty cells(cells with no data or only style) outside the used data range, default true.
13890
13898
  * @property {string} [password] - Set the password to open the workbook.
@@ -16716,13 +16724,16 @@ declare module GC{
16716
16724
  /**
16717
16725
  * Gets or sets the formula for the cell.
16718
16726
  * @param {string} [value] The cell formula.
16727
+ * @param {boolean} [autoAdjustReference] Whether to adjust the relative reference of each cell. It's false if omitted.
16719
16728
  * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the cell formula; otherwise, returns the cell.
16720
16729
  * @example
16721
16730
  * ```
16722
16731
  * activeSheet.getCell(0,2).formula("DATEDIF(DATE(2003,1,1),DATE(2016,1,1),\"Y\")");
16732
+ * activeSheet.getRange(2,2,100,1).formula("=A3+$A$1"); // all the cells are "=A3+$A$1"
16733
+ * activeSheet.getRange(2,2,100,1).formula("=A3+$A$1", true); // the first cell is "=A3+$A$1", the second cell is "=A4+$A$1", ...
16723
16734
  * ```
16724
16735
  */
16725
- formula(value?: string): any;
16736
+ formula(value?: string, autoAdjustReference?: boolean): any;
16726
16737
  /**
16727
16738
  * Gets or sets the horizontal alignment of the contents of the cell.
16728
16739
  * @param {GC.Spread.Sheets.HorizontalAlign} [value] The horizontal alignment.
@@ -22760,6 +22771,17 @@ declare module GC{
22760
22771
  * ```
22761
22772
  */
22762
22773
  addSpan(row: number, col: number, rowCount: number, colCount: number, sheetArea?: GC.Spread.Sheets.SheetArea): void;
22774
+ /**
22775
+ * Adds a lot of spans to this sheet in the specified sheet area.
22776
+ * @param {Array} spans The span ranges, each range contains row, col, rowCount, colCount.
22777
+ * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to `viewport`.
22778
+ * @example
22779
+ * ```
22780
+ * //This example creates cell spans.
22781
+ * sheet.addSpans([{row: 0, col: 0, rowCount: 2, colCount: 2}, {row: 3, col: 0, rowCount: 3, colCount: 3}, {row: 7, col: 0, rowCount: 4, colCount: 4}], GC.Spread.Sheets.SheetArea.viewport);
22782
+ * ```
22783
+ */
22784
+ addSpans(spans: GC.Spread.Sheets.IRange[], sheetArea?: GC.Spread.Sheets.SheetArea): void;
22763
22785
  /**
22764
22786
  * Automatically fits the viewport column.
22765
22787
  * @param {number} column The column index.
@@ -50663,11 +50685,11 @@ declare module GC{
50663
50685
  * return item['cost'] + '$';
50664
50686
  * }
50665
50687
  * var table = sheet.tables.add('tableSales', 0, 0, 5, 5);
50666
- * var tableColumn1 = new GC.Spread.Sheets.Tables.Tables.TableColumn(1, "orderDate", "Order Date", "d/M/yy");
50667
- * var tableColumn2 = new GC.Spread.Sheets.Tables.Tables.TableColumn(2, "item", "Item");
50668
- * var tableColumn3 = new GC.Spread.Sheets.Tables.Tables.TableColumn(3, "units", "Units");
50669
- * var tableColumn4 = new GC.Spread.Sheets.Tables.Tables.TableColumn(4, "cost", "Cost", null, null, convert);
50670
- * var tableColumn5 = new GC.Spread.Sheets.Tables.Tables.TableColumn(5, "isMakeMoney", "IsMakeMoney", null, new GC.Spread.Sheets.CellTypes.CheckBox());
50688
+ * var tableColumn1 = new GC.Spread.Sheets.Tables.TableColumn(1, "orderDate", "Order Date", "d/M/yy");
50689
+ * var tableColumn2 = new GC.Spread.Sheets.Tables.TableColumn(2, "item", "Item");
50690
+ * var tableColumn3 = new GC.Spread.Sheets.Tables.TableColumn(3, "units", "Units");
50691
+ * var tableColumn4 = new GC.Spread.Sheets.Tables.TableColumn(4, "cost", "Cost", null, null, convert);
50692
+ * var tableColumn5 = new GC.Spread.Sheets.Tables.TableColumn(5, "isMakeMoney", "IsMakeMoney", null, new GC.Spread.Sheets.CellTypes.CheckBox());
50671
50693
  * table.autoGenerateColumns(false);
50672
50694
  *
50673
50695
  * table.bind([tableColumn1, tableColumn2, tableColumn3, tableColumn4, tableColumn5], 'sales', data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mescius/spread-sheets",
3
- "version": "17.0.7",
3
+ "version": "17.0.9",
4
4
  "main": "index.js",
5
5
  "description":"A Complete Microsoft Excel-like JavaScript Spreadsheet for Enterprise Applications",
6
6
  "scripts": {},