Jump to content

Export Query to Excel


Recommended Posts


I have used SMExportToExcel [the components 'about' gives ver 5.0 (b17)]. without issue.

I just recompiled an old app (was xe5) using Xe8 and UniGui It still exports fine.

The form with a UniDbGrid (whose dataset is on the MainModule) has a button: It simply sets the filename (from a procedure that gets the query details) on a SMExporttoXLS component that is on the MainModule, and runs the export. 

 procedure TfrmSQLRes.btn2ExcelClick(Sender: TObject);
  var fname : string;
  fname := makeFilename('.XLS');
  unimainmodule.SMExportToXLS1.filename := fname;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...