|
|
|
|
- Properties specific to the description of xlsCell variables
xlsCell (Type of variable) In french: xlsCellule
An xlsCell variable is used to describe and modify a cell in an Excel document. This type of variable is used: Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
// Open an Excel file sExcelFile is string sExcelFile = fSelect("", "", "Select an Excel file...", "Excel" + ... TAB + "*.xlsx" + CR + "All files (*.*)" + TAB + "*.*", "*.xlsx") IF sExcelFile = "" THEN RETURN  // Open the Excel document MyDocument is xlsDocument MyDocument = xlsOpen(sExcelFile)  // Create an xlsCell variable with red background. Cell is xlsCell Cell = "WINDEV is incredible!" Cell.BackgroundColor = LightRed  // Fill in cell A6 MyDocument..Cell[6,"A"] = Cell  // Saves the modifications xlsSave(MyDocument) xlsClose(MyDocument)
Remarks Properties specific to the description of xlsCell variables The following properties can be used to handle an xlsCell variable: | | | Name | Type used | Effect |
---|
AlignmentH | Integer constant | Horizontal cell alignment. The possible values are as follows:- haCenter: centered.
- haRight: right alignment.
- haLeft: alignment to left.
| AlignmentV | Integer constant | Vertical cell alignment. The possible values are as follows:- vaTop: alignment at the top.
- vaMiddle: alignment in the middle.
- vaBottom: alignment at the bottom.
| Border | Border variable | Characteristics of cell border. | BackgroundColor | Integer or Integer constant | Cell background color. This color can correspond to: Before version 24, this property was named "BackgroundColor". | Mask | Character string | Display mask in Excel. This mask must correspond to the mask recognized by Excel. See the documentation about Excel for more details. | MaskWD | Character string | Display 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. | Multiline | Boolean | - True if the cell is multiline,
- False otherwise.
| Font | Font variable | Font of cell. | Type | Integer constant | Excel 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 more details on the error, use xlsMsgError or ErrorInfo with the errMessage constant.
- xlsTypeTime: "Time" column.
- xlsTypeCurrency: "Currency" column.
This property is available in read-only. | Value | Type of cell value | Value 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). |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|