ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Spreadsheet functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Merges specified or selected cells in an Spreadsheet control.
Example
// Merge cells of the rectangle formed between B2 on the upper-left corner and D4 on
// the lower-right corner, the data of B2 is centered in the new merged cell
PSHEET_mySpreadsheet["B2"] = "Title"
PSHEET_mySpreadsheet.MergeCell("B2", "D4")
Syntax

Merging specified cells Hide the details

<Spreadsheet control>.MergeCell(<Start cell> , <End cell> [, <Type of merge>])
<Spreadsheet control>: Control name
Name of the Spreadsheet control to be used.
<Start cell>: Optional character string
Name of the first cell (cell in the upper-left corner) of the selection of cells to be merged. This parameter has the following format: <Column letter><Row number>. For example: "A32".
<End cell>: Optional character string
Name of the last cell (cell in the lower-right corner) of the selection of cells to be merged. This parameter has the following format: <Column letter><Row number>. For example: "A32".
<Type of merge>: Optional Integer constant
Type of merge to be performed:
mergeCellCenter
(Default value)
Merges the cells and centers the contents.
mergeCellMerges the cells without centering the contents.

Merging currently selected cells Hide the details

<Spreadsheet control>.MergeCell([<Type of merge>])
<Spreadsheet control>: Control name
Name of the Spreadsheet control to be used.
<Type of merge>: Optional Integer constant
Type of merge to be performed:
mergeCellCenter
(Default value)
Merges the cells and centers the contents.
mergeCellMerges the cells without centering the contents.
Remarks
You can also merge the selected cells of a Spreadsheet control using AAFExecute (with the aafSpreadsheetMerge constant).
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help