ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XLS file functions
  • Properties specific to xlsComment variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The xlsComment type is used to defined all the advanced characteristics of a comment in a cell of an XLS file or Spreadsheet control. You can define and change the characteristics of this comment using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Adds a comment for cell A1 and makes it visible
PSHEET_Spreadsheet["A1"].Comment.Text = "Title" + CR + "my note"
PSHEET_Spreadsheet["A1"].Comment.Visible = True
sFile is string = "file.xlsx"
xlsDoc is xlsDocument
xlsDoc.AddWorksheet("F1")
xlsDoc.Cell[2, 5] = xlsCoordinatesToName(2, 2)
xlsDoc.Comment[2, 5].Text = "Comment"
xlsDoc.Comment[2, 5].Rectangle.X = 10
xlsDoc.Comment[2, 5].Rectangle.Y = 10
xlsDoc.Comment[2, 5].Rectangle.Width = 40
xlsDoc.Comment[2, 5].Rectangle.Height = 20
xlsDoc.Comment[2, 5].Visible = True
xlsDoc.Save(sFile)
xlsDoc.Close()
Properties

Properties specific to xlsComment variables

The following properties can be used to manipulate a comment in a cell:
Property nameType usedEffect
PositionCharacter stringCell in which the comment is displayed (e.g., "A3").
This property is read-only.
RectangleRectangle variableSize and position in pixels of the rectangle containing the comment.
Note: The origin of the rectangle (0.0) is the upper-right corner of the cell.
TextCharacter stringComment text.
VisibleBoolean
  • True to show the comment,
  • False to make the comment invisible. In this case, a red triangle in the upper-right corner of the cell will let the user know that the cell is associated with a comment.
Remarks
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/03/2024

Send a report | Local help