An easy way to achieve it is to get this
FREE DataExport[
^]to assist in your project.
This free Data Export Component can easily help you export data from SQL/DataTable to
XLS, PDF and MS Word, HTML, MS clipboard ,XML, PDF, DBF, SQL Script, SYLK, DIF, CSV. Free Data Export Component is totally independant and not necessary to install Microsoft Excel or Adobe Acrobat or Microsoft Access on your machine.