HotXLS-dokumentation Indhold Startside Oversigt TGridToXLS TDataToXLS Startside Indhold Oversigt

TcxGridAddExcel component

Enhed: cxGridAddExcel
Optional component for exporting DevExpress TcxGridDBTableView content to a HotXLS workbook

Beskrivelse

TcxGridAddExcel mirrors the dataset and DBGrid export components for 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 Exports the assigned CxDBTableView and saves the workbook to the specified file SaveAs Saves the current workbook after the component has exported data into it ExportCxGrid Exports the cxGrid view to the current workbook, optionally creating a new sheet, choosing a start cell, or assigning a sheet name Abort Stops a running export from an event handler

Workbook target properties

property CxDBTableView: TcxGridDBTableView; property Workbook: IXLSWorkbook; property Worksheet: TXLSWorksheet; property WorksheetName: String; CxDBTableView selects the DevExpress view to export. Workbook, Worksheet, and WorksheetName let the export append to an existing workbook or direct output to a named worksheet

Layout and 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 export starts, whether headers and selected rows are exported, how many rows go to each sheet, how columns are sized, and which fields create grouped output

Formatting properties

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; Use these properties to apply HotXLS fonts, colors, borders, and format suppression rules, or to keep original cxGrid header and detail styling where supported 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 handlers receive the generated IXLSRange or TXLSWorksheet objects so callers can adjust cells, headers, grouped rows, worksheet setup, or final export ranges while the cxGrid export is running Copyright © 2010-2026 losLab Software