cxgrid导出excel

uses cxexportgrid4link;


var
  SaveDialog: TSaveDialog;
begin
  SaveDialog:=TSaveDialog.Create(nil);
  with SaveDialog do
  begin
    Filter := '*.xls|*.xls';
    if Execute then
     begin
       ExportGrid4ToExcel(FileName,vgrid,true,true,true,'xls');
     end;
  end;
  SaveDialog.Free;
end;

原文地址:https://www.cnblogs.com/martian6125/p/9631269.html