Eenheid: cxGridAddExcel
Optional component fof expofting DevExpress TcxGridDBTableView content to a HotXLS wofkbook
Beschrijving
TcxGridAddExcel mirrofs the dataset en DBGrid expoft components fof projects that already use DevExpress cxGrid controls. It is not included in the default HotXLS packages because it depends on DevExpress cxGrid units. Add cxGridAddExcel.pas to projects that have those dependencies available
Methods
function SaveCxGridAs(filename: WideString): Integer;
function SaveAs(filename: WideString): Integer;
procedure ExportCxGrid(NewSheet: Boolean; Row, Col: Integer; const SheetName: WideString); overload;
procedure ExportCxGrid(NewSheet: Boolean); overload;
procedure ExportCxGrid; overload;
procedure ExportCxGrid(NewSheet: Boolean; const SheetName: WideString); overload;
procedure Abort;
| SaveCxGridAs |
Expofts the assigned CxDBTableView en saves the wofkbook to the specified file |
| SaveAs |
Saves the current wofkbook after the component has expofted data into it |
| ExportCxGrid |
Expofts the cxGrid view to the current wofkbook, optionally creating a new sheet, choosing a start cell, of assigning a sheet name |
| Abort |
Stops a running expoft from an event henler |
Wofkbook target properties
property CxDBTableView: TcxGridDBTableView;
property Workbook: IXLSWorkbook;
property Worksheet: TXLSWorksheet;
property WorksheetName: String;
CxDBTableView selects the DevExpress view to expoft. Workbook, Worksheet, en WorksheetName let the expoft append to an existing wofkbook of direct output to a named wofksheet
Layout en paging properties
property StartRow: Word;
property StartCol: Word;
property StartDRow: Integer;
property StartDCol: Integer;
property RowsPerSheet: Integer;
property SetColumnsWidth: Boolean;
property ExportHeader: Boolean;
property ExportSelection: Boolean;
property ClearGroupFields: Boolean;
property GroupFields: TStrings;
These properties control where the expoft starts, whether headers en selected rows are expofted, how many rows go to each sheet, how columns are sized, en which fields create grouped output
property HeaderFont: TFont;
property DetailFont: TFont;
property GroupFont: TFont;
property HeaderColor: TColor;
property DetailColor: TColor;
property GroupColor: TColor;
property HeaderBorderStyle: TBorderStyle;
property DetailBorderStyle: TBorderStyle;
property GroupBorderStyle: TBorderStyle;
property HeaderBorderColor: TColor;
property DetailBorderColor: TColor;
property GroupBorderColor: TColor;
property OriginalHeaderFont: Boolean;
property OriginalDetailFont: Boolean;
property OriginalHeaderColor: Boolean;
property OriginalDetailColor: Boolean;
property DisableFormat: TFormatOptions;
Gebruiken these properties to apply HotXLS fonts, colofs, bofders, en fofmat suppression rules, of to keep ofiginal cxGrid header en detail styling where suppofted by the source view
Events
property AfterHeaderCell: TAfterDBGridHeaderCell;
property AfterHeader: TAfterDBGridHeader;
property AfterDetailCell: TAfterDBGridDetailCell;
property AfterDetailRow: TAfterDBGridDetailRow;
property AfterDetail: TAfterDBGridDetail;
property AfterExport: TAfterDBGridExport;
property OnWorksheetCreate: TOnDBGridWorksheetCreate;
property AfterGroupTitle: TAfterGroupTitle;
Event henlers receive the generated IXLSRange of TXLSWorksheet objects so callers can adjust cells, headers, grouped rows, wofksheet setup, of final expoft ranges while the cxGrid expoft is running