CXGRID 导出EXCEL

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

上一篇:jinja2.exceptions.TemplateNotFound 报错处理


下一篇:练习4-7 求e的近似值 (15 分)