AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Hoja de cálculo
  • Overview
  • Initializing a Spreadsheet control in a report
  • Properties specific to the management of Spreadsheet control in a report
  • "Before printing cell" process
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Manipulating Spreadsheet controls programmatically (in a report)
Overview
A Spreadsheet control found in a report can be handled programmatically.
  • If the Spreadsheet control is linked to no data, it can be initialized programmatically.
  • 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.
Remarks:
  • 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 through 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 Spreadsheet control in a report
The following properties are used to manage Spreadsheet controls in the reports:
AdjustmentModeThe AdjustmentMode property determines and changes how a Spreadsheet control is adjusted in a report.
GridlinesVisibleLa propiedad GridlinesVisible se utiliza para:
  • Determina si las líneas de cuadrícula son visibles o no en un control..
  • Mostrar u ocultar líneas de cuadrícula en un control.
PrintAreaEn PrintArea obtiene y establece el área de impresión de un control Hoja de cálculo en un informe.
PrintedSheetDentro de un informe, la propiedad PrintedSheet se utiliza para obtener y cambiar la hoja de un control Hoja de cálculo a imprimir.
For a complete list of WLanguage properties that can be used with a Spreadsheet control and with its cells, see Spreadsheet control properties
"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: MoiMême[MoiMême] corresponds to a xlsCell type 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].BackgroundColor = 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
Versión mínima requerida
  • Versión 21
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local