基于TMS Flexcel的UniDBGrid导出Excel的pas源码,调用时只要引用并写这几句话就能生成Excel文件了,且无乱码
procedure TfmGeneDataSupplier.UniButton2Click(Sender: TObject);
var
f:string;
begin
f:=UniServerModule.StartPath+'ExcelExports\'+'供应商TP订单导出 - '+UniMainModule.pSupplierName+'.xlsx';
DBGridToXLS(f,UniDBGrid1, 1, 1);
MainForm.uniApplication.UniSession.SendFile(f);
UserLogs(UniMainModule.LoggedUser, UniApplication.RemoteAddress, 'TP订单导出', 'fmGeneralDataSupplier', '导出文件名:'+f, DateTimeToStr(now()));
end;
2021-06-10 15:14:29
7KB
源码
1