USES
cxgridExportlink
procedure TfrmAdvAPS.CxGridToExcel(AcxGrid: TcxGrid); var SaveDialog: TSaveDialog; begin SaveDialog := TSaveDialog.Create(nil); try with SaveDialog do begin FileName := ‘导出‘; Filter := ‘*.xls|*.xls|*.xlsx|*.xlsx|‘; if Execute then begin case SaveDialog.FilterIndex of 1: ExportGridToExcel(SaveDialog.FileName, AcxGrid, true, true, true, ‘xls‘); 2: ExportGridToXLSX(SaveDialog.FileName, AcxGrid, true, true, true, ‘xlsx‘); //2007 end; end; end; finally SaveDialog.Free; end; end;