PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Initializing a Spreadsheet control in a report
  • Properties specific to the management of a Spreadsheet control in a report
  • "Before printing cell" process
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Handling a Spreadsheet control by programming (in a report)
Overview
A Spreadsheet control found in a report can be handled by programming.
  • If the Spreadsheet control is linked to no data, it can be initialized by programming.
  • Several properties can be used to manage a Spreadsheet control in a report.
  • The "Before printing cell" process is used to modify the cells of the Spreadsheet control.
Notes:
  • No cell can be created during the print. The print must be performed from the Spreadsheet control found in a window or from an Excel document.
  • The height and width of the cells, rows or columns cannot be modified.
Initializing a Spreadsheet control in a report
To initialize a Spreadsheet control found in a report by programming, all you have to do is assign the Excel file to the control (in the opening process of the report or in the initialization process of the control for example).
<Name_Spreadsheet_Control> = <File Name>
For example:
PSHEET_Statistics = "Show2015.xlsx"
Properties specific to the management of a Spreadsheet control in a report
The following properties are used to manage the Spreadsheet controls in the reports:
Versions 21 and later
AdjustmentMode
New in version 21
AdjustmentMode
AdjustmentMode
..AdjustmentMode is used to find out and modify the adjustment mode of a Spreadsheet control in a report.
Versions 21 and later
PrintArea
New in version 21
PrintArea
PrintArea
..PrintArea is used find out and modify the area to print for a Spreadsheet control found in a report.
Versions 21 and later
PrintedSheet
New in version 21
PrintedSheet
PrintedSheet
..PrintedSheet is used find out and modify the sheet to print for a Spreadsheet control found in a report.
To find out the entire list of WLanguage properties that can be used with a Spreadsheet control and with its cells, see Properties associated with the Spreadsheet control
"Before printing cell" process
The "Before printing cell" process is a process associated with the Spreadsheet control in the reports.
This process is used to customize the characteristics of the cells found in the Spreadsheet control.
You can use:
  • the MySelf keyword to get the name of the current cell.
  • the MySelf[MySelf] syntax to get the content of the cell.
Tip: MySelf[MySelf] corresponds to an xlsCell variable. All the properties of this variable type can be used and they allow you to modify the characteristics of the cell.
Example:
MyFont is Font
MyFont..Name = "Comic Sans MS"
MyFont..Size = 10
MyFont..Bold = True
MyFont..Underline = True
MyFont..Color = PastelBlue

ABorder is Border
ABorder..Line = LineDotAndDash
ABorder..Thickness = 1
ABorder..Edges = BorderAll

IF MySelf [= "B" THEN
MySelf[MySelf].BrushColor = PastelOrange
IF Right(MySelf[MySelf],1) = 8 THEN
MySelf[MySelf]..Font = MyFont
END
IF Right(MySelf[MySelf],1) = 6 THEN
MySelf[MySelf]..Border = ABorder
END
IF Right(MySelf[MySelf],1) = 2 THEN
MySelf[MySelf]..Value = "RESET"
MySelf[MySelf]..Font..Color = Black
MySelf[MySelf]..Font..Size = 13
END
END
Minimum required version
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment