function ExportExcel(grid: TcxGrid; const fileName: string = '1.xls'): Boolean;
var
  sd: TSaveDialog;
begin
  Result := False;
  if not Assigned(grid) then
    Exit;
  sd := TSaveDialog.Create(nil);
  try
    sd.Filter := '*.xls|*.xls';
    sd.fileName := fileName;
    if sd.Execute then
    begin
      Screen.Cursor := crSQLWait;
      try
        ExportGridToExcel(sd.fileName, grid);
      finally
        Screen.Cursor := crDefault;
      end;
      Result := True;
    end;
  finally
    sd.Free;
  end;
end;

相关文章:

  • 2021-12-04
  • 2021-05-10
  • 2021-04-18
  • 2021-10-09
猜你喜欢
  • 2021-05-18
  • 2021-05-31
  • 2021-06-15
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-12-28
相关资源
相似解决方案