Louay02 Posted April 14, 2019 Share Posted April 14, 2019 Hi, I would like to export a Query result to Excel using the SMExportToExcel component on Unigui platform, but I didn't get a result till now has anyone an adea how can i use it? Link to comment Share on other sites More sharing options...
Sherzod Posted April 14, 2019 Share Posted April 14, 2019 Hi, Can you please specify which edition and build of UniGUI are you using? You can try to search on the forum Link to comment Share on other sites More sharing options...
Louay02 Posted April 15, 2019 Author Share Posted April 15, 2019 Hi, I'm using Unigui 1.50.0.1480 with delphi XE 10.2 and SMExport 5 I'was trying to search on the forum but i didn't find a clear answer thanks Link to comment Share on other sites More sharing options...
mierlp Posted April 15, 2019 Share Posted April 15, 2019 What doesn't work and what did you try? Link to comment Share on other sites More sharing options...
Louay02 Posted April 15, 2019 Author Share Posted April 15, 2019 when i execute :SMExportToExcel1.Execute; i got this error : Cannot assign a nil to a TFont Link to comment Share on other sites More sharing options...
rencarnacion Posted April 15, 2019 Share Posted April 15, 2019 Try to use TMS Flexcel is an excellent Component to export and read excel files Link to comment Share on other sites More sharing options...
Louay02 Posted April 15, 2019 Author Share Posted April 15, 2019 TMS Flexcel is work with unigui correctly ? without any complexity ? Link to comment Share on other sites More sharing options...
Harry Rogers Posted April 15, 2019 Share Posted April 15, 2019 Hi 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 1.70.0.1485. 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; begin fname := makeFilename('.XLS'); unimainmodule.SMExportToXLS1.filename := fname; unimainmodule.SMExportToXLS1.Execute; end; Link to comment Share on other sites More sharing options...
Louay02 Posted April 15, 2019 Author Share Posted April 15, 2019 on MainModule dosn't accept a button on it !!!! error :invalid class typecast Link to comment Share on other sites More sharing options...
Harry Rogers Posted April 15, 2019 Share Posted April 15, 2019 Sorry you misunderstand me. The main module holds the data set and the export component. the form 'frmSQLRes' has a button named 'btn2Excel' it's the onClick of that which is the code I showed above. Good luck Link to comment Share on other sites More sharing options...
Louay02 Posted April 16, 2019 Author Share Posted April 16, 2019 21 hours ago, Harry Rogers said: thank you it's work i jsut add some parameter to TSMExportToXLS.ColumnSource =csDataSet Link to comment Share on other sites More sharing options...
Harry Rogers Posted April 16, 2019 Share Posted April 16, 2019 Great, glad to here its working for you. All the best Link to comment Share on other sites More sharing options...
mierlp Posted April 18, 2019 Share Posted April 18, 2019 Hi You also have to disable the OPTIONS property: - soShowMessage - soWaitCursor AnimatedStatus = False 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now