Jump to content

Export to Excel without Excel


adragan

Recommended Posts

It seems I was to optimistic about "working" export to Excel.

There is a problem with exporting long integers so , if you have id-s in the 100000

range or more that you want exported , first cast them as strings.

 

As for a demo, it couldn't be simpler :

 

uses uNativeXLSExport;

..................

 

procedure TUniMainModule.ExportExcel(ADataSet:TDataSet);
  var
           fname:string;
  begin
  fname := UniServerModule.LocalCachePath + 'E' + FormatDateTime('hhmmss', Now()) + '.xls'; // Create a unique name for report.
  DataSetToXLS(ADataSet, fname);
  UniSession.SendFile(fname);
  end;
 

Link to comment
Share on other sites

  • 6 months later...
  • 7 years later...
  • 3 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...