Merge/Unmerge Cells

PUT /api/spreadsheet/mergecells

Input example (JSON)

{
"id": "some_id",
"filename": "test",
"extension": "xls",
"sheetindex": 0,
"sheetname": "Sheet1",
"startcolumnindex": 1,
"startrowindex": 2,
"totalcolumns": 3,
"totalrows": 4
}

Description: Merges the specified number of rows and columns starting with the required cell.

JSON fields

  • id - an identifier of a session to which the document has been loaded. This parameter's value is returned by the request used to create or load the document.

  • filename - a string value that specifies the file name of the document to which cells belong.

  • extension - a string value that specifies the file extension of the document to which cells belong. SpreadsheetCloudAPI

  • sheetindex - a zero-based index of the worksheet to which cells belong.

  • sheetname - a string value that specifies the name of the worksheet to which cells belong.

  • startcolumnindex - a zero-based index of the first merged column.

  • startrowindex - a zero-based index of the first merged row.

  • totalcolumns - a positive integer value that specifies the number of columns to be merged.

  • totalrows - a positive integer value that specifies the number of rows to be merged.


GET /api/spreadsheet/getmergedcells?id&filename&extension&sheetindex&sheetname

Description: Gets a list of merged cells that belong to the specified worksheet. Each merged cell is returned in the JSON format.

Request parameters

  • id - an identifier of a session to which the document has been loaded. This parameter's value is returned by the request used to create or load the document.

  • filename - a string value that specifies the file name of the document to which cells belong.

  • extension - a string value that specifies the file extension of the document to which cells belong. The supported file extensions are: OPENXML (XLSX), XLS and CSV.

  • sheetindex - a zero-based index of the worksheet to which cells belong.

  • sheetname - a string value that specifies the name of the worksheet to which cells belong.


PUT /api/spreadsheet/unmergecells

Input example (JSON)

{
"id": "some_id",
"filename": "test",
"extension": "xls",
"sheetindex": 0,
"sheetname": "Sheet1",
"startcolumnindex": 1,
"startrowindex": 2,
"totalcolumns": 3,
"totalrows": 4
}

Description: Splits the merged cell by the specified number of rows and columns.

JSON fields

  • id - an identifier of a session to which the document has been loaded. This parameter's value is returned by the request used to create or load the document.

  • filename - a string value that specified the file name of the document to which cells belong.

  • extension - a string value that specified the file extension of the document to which cells belong. The supported file extensions are: OPENXML (XLSX), XLS and CSV.

  • sheetindex - a zero-based index of the worksheet to which cells belong.

  • sheetname - a string value that specified the name of the worksheet to which cells belong.

  • startcolumnindex - a zero-based index of the first unmerged column.

  • startrowindex - a zero-based index of the first unmerged row.

  • totalcolumns - a positive integer value that specified the number of columns the merged cells will be split into.

  • totalrows - a positive integer value that specified the number of rows the merged cells will be split into.