首页 > 其他 > 详细

CXGRID 导出EXCEL

时间:2021-07-28 18:16:31      阅读:32      评论:0      收藏:0      [点我收藏+]
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;

 

CXGRID 导出EXCEL

原文:https://www.cnblogs.com/redhat588/p/15070450.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!