Occurs after the new Worksheet is added into the Workbook
Description
You can use this event to set any additional options for created Worksheet
Syntax
TOnDBGridCreateWorksheet =
procedure(Sender: TObject; Worksheet:
TXLSWorksheet) of object;
| Sender |
TObject. Specifies the TGridToXLS component that triggered the event |
| Worksheet |
TXLSWorksheet which represents a new Worksheet |
Example
This example sets the PageSetup options for created Worksheet
procedure TForm1.GridToXLS1AfterNewSheet(Sender: TObject;
Worksheet: TXLSWorksheet);
begin
Worksheet.PageSetup.CenterHeader := 'Monthly report';
end;