Wednesday, June 10, 2009

Export to excel (.xls) format with delphi

With Advanced Data Export VCL we can exporting data data into MS Access, MS Excel, MS Word (RTF), Open XML Format, Open Document Format (ODF), HTML, XML, PDF, TXT, DBF, CSV and more!
in the export of data can be obtained from several sources including:
  • datasource
  • dbgrid
  • listview
  • stringgrid
  • custom
In this article I will only discuss the export of data using a datasource and db grid only in to xls format.
but for export to other formats are similar, select the components appropriate to stay the desired format.

xls export to the data source
in this discussion I do not discuss how we create the database. here I use the virtual table.

Step by step :
create a new project
  • components enter the virtual table can not have use the table and connect to the database you have created.
  • pairs datasource
  • pairs of components dbgrid
  • pairs QExport4XLS from tab EMS Advanced Data Export
  • pairs Button and change properties captions "Export"
  • pairs savedialog from dialogs tab
UNDER CONSTRUCTIONS

2 comments: