ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Spreadsheet functions
  • Properties specific to psheetSelection variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The psheetSelection type is used to find out the advanced characteristics of a selection in a Spreadsheet control. The characteristics of this selection are returned by several WLanguage properties.
The .Selection property gets a variable of type psheetSelection.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
sel is psheetSelection = TBLR_MonTableur.Sélection
IF sel.Type = psheetSelSimpleCell THEN
	// Afficher le nom de la cellule dans la barre de message
	MGSBAR = sel.MinCell
END
t is psheetSelection
t = TBLR_SansNom1.Sélection
SWITCH t.Type
	CASE psheetSelSimpleCell : Trace("Vous avez sélectionné une seule case.")
	CASE psheetSelSimpleHeader : Trace("Vous avez sélectionné un seul entête.")
	CASE psheetSelMultiCell : Trace("Vous avez sélectionné plusieurs cases.")
	CASE psheetSelMultiHeader : Trace("Vous avez sélectionné plusieurs entêtes.")
	CASE psheetSelRectCell : Trace("Vous avez sélectionné plusieurs cases (rectangle).")
	CASE psheetSelEmpty : Trace("Vous n'avez sélectionné aucune case.")
	CASE psheetSelAll : Trace("Vous avez sélectionné toute la feuille.")
	OTHER CASE
END

te is array of strings = t.Header
tc is array of strings = t.Cell
Trc is array of strings = t.RectCell
Trace("-----------------------------")
Trace("")

Trace("Cellule min:", t.MinCell)
Trace("Cellule max:", t.MaxCell)
Trace("-----------------------------")
Trace("")

Trace("Parcours des entêtes")
FOR i = 1 TO te.Count
	Trace("entête " + i + ":", te[i])
END
Trace("-----------------------------")
Trace("")

Trace("Parcours des cellules")
FOR i = 1 TO tc.Count
	Trace("cellule " + i + ":", tc[i])
END
Trace("-----------------------------")
Trace("")

Trace("Parcours d'un rectangle de cellules")
FOR i = 1 TO Trc.Count
	Trace("rect cellule " + i + ":", Trc[i])
END
Trace("-----------------------------")
Trace("")
Properties

Properties specific to psheetSelection variables

The following properties can be used to handle a selection in a Spreadsheet control:
Property nameType usedEffect
CellArray of stringsArray of selected cells. The cells are sorted according to the selection order.
This property is read-only.
HeaderArray of stringsSelected headers (headers of selected rows and/or columns).
This property is read-only.
MaxCellCharacter stringMaximum selected cell, which means the cell found at the bottom right of the rectangle defining the selection of cells.
This property is read-only.
MinCellCharacter stringMinimum selected cell, which means the cell found at the top left of the rectangle defining the selection of cells.
This property is read-only.
RectCellArray of stringsArray of rectangles of selected cells. Example: "A1:B2"
This property is read-only.
TypeInteger constantType of selection:
  • tblrSelMultiCell: Several boxes are selected.
  • tblrSelMultiEntête: Several headers are selected.
  • tblrSelRectCell: several cells are selected to form a rectangle.
  • tblrSelSimpleCell: A single box is selected.
  • tblrSelSimpleHeader: A single header is selected.
  • tblrSelTout: The entire sheet is selected.
  • tblrSelVide: No selection.
This property is read-only.
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help