PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Properties specific to the description of xlsCell variables
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
xlsCell (Type of variable)
In french: xlsCell
An xlsCell variable is used to describe and modify a cell in an Excel document.
This type of variable is used:
Remark: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Versions 16 and later
Linux This type of variable is now available in WINDEV Linux.
WEBDEV - Server codeLinux This type of variable is now available in WEBDEV Linux.
New in version 16
Linux This type of variable is now available in WINDEV Linux.
WEBDEV - Server codeLinux This type of variable is now available in WEBDEV Linux.
Linux This type of variable is now available in WINDEV Linux.
WEBDEV - Server codeLinux This type of variable is now available in WEBDEV Linux.
Example
// Ouverture d'un fichier Excel
sFichierExcel is string
sFichierExcel = fSelect("", "", "Sélectionnez un fichier Excel...", "Excel" + ...
TAB + "*.xlsx" + CR + "Tous les fichiers (*.*)" + TAB + "*.*", "*.xlsx")
IF sFichierExcel = "" THEN RETURN
 
// Ouverture du document Excel
MonDocument is xlsDocument
MonDocument = xlsOpen(sFichierExcel)
 
// Création d'une variable xlsCellule avec fond rouge.
Cellule is xlsCell
Cellule = "WINDEV est formidable!"
Cellule.BackgroundColor = LightRed
 
// Renseigne la cellule A6
MonDocument..Cell[6,"A"] = Cellule
 
// Sauvegarde les modifications
xlsSave(MonDocument)
xlsClose(MonDocument)
Remarks

Properties specific to the description of xlsCell variables

The following properties can be used to handle an xlsCell variable:
NameType usedEffect
AlignmentHInteger constantHorizontal cell alignment. The possible values are as follows:
  • haCenter: centered.
  • haRight: right alignment.
  • haLeft: left alignment.
AlignmentVInteger constantVertical cell alignment. The possible values are as follows:
  • vaTop: alignment at the top.
  • vaMiddle: alignment in the middle.
  • vaBottom: alignment at the bottom.
BorderBorder variableCharacteristics of cell border.
BackgroundColorInteger or Integer constantCell background color. This color can correspond to:
Before version 24, this property was named "BackgroundColor".
MaskCharacter stringDisplay mask in Excel. This mask must correspond to the mask recognized by Excel. See the documentation about Excel for more details.
MaskWDCharacter stringDisplay mask in WINDEV or WEBDEV format that will be used in the Excel cell ("DD/MM/YYYY" for example). The specified mask is automatically converted into Excel format. The hundredths of a second found in the masks are not supported.
For more details, see Supported masks.
This property is available in write mode.
MultilineBoolean
  • True if the cell is multiline,
  • False otherwise.
FontFont variableFont of cell.
TypeInteger constantExcel type of cell. The possible values are as follows:
  • xlsTypeString: "Character string" column or column containing different types of data.
  • xlsTypeDate: "Date" column.
  • xlsTypeDateTime: "DateTime" column.
  • xlsTypeDouble: "Numeric" column.
  • xlsTypeDuration: "Duration" column.
  • xlsTypeError: If an error occurs. To get the details of the error, use xlsMsgError or ErrorInfo with the errMessage constant.
  • xlsTypeTime: "Time" column.
  • xlsTypeCurrency: "Currency" column.
This property is available in read-only.
ValueType of cell valueValue of the cell.
When defining the style of a column (xlsColumn.DefaultCell), this property is ignored in write mode and it is initialized empty in read mode).
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment