PRODUCTS » Quick Links

FEATURED PRODUCT

The most powerful, fastest & flexible suite for native Excel file manipulation and Excel,PDF,HTML report generation for .NET

License only 125 EUR See More

LOGIN

Customer login to access products, support information & special benefits.

SEARCH

STAY IN TOUCH

Add your e-mail address here to receive the monthly TMS Software alerts.

 

LINKS

PRODUCTS » VCL COMPONENTS » TADVSTRINGGRID » EXAMPLE 59

TAdvStringGrid

Example 59 : using TAdvGridWorkbook with TAdvGridExcelIO to load/save multi sheet XLS files

TAdvStringGrid

The new TAdvGridExcelIO component is TAdvGridWorkbook aware, making an almost codeless solution possible to load and save multisheet XLS files.

TAdvGridExcelIO has now 2 properties: AdvGridWorkbook : assign a TAdvGridWorkbook to this property if you want to use it with a workbook. AdvStringGrid : assign a TAdvStringGrid to this property if you want to use it with just one grid.

To load the default sheet from an XLS file in a workbook or grid, use:

AdvGridExcelIO.XLSImport(filename,1);

To load all sheets from an XLS file in a workbook, use:

AdvGridExcelIO.XLSImport(filename);

Similary, to export one sheet from TAdvStringGrid or TAdvGridWorkbook (the active sheet in this case) use:

AdvGridExcelIO.XLSExport(filename, sheetname);

To export all sheets of a TAdvGridWorkbook to an XLS file use:

AdvGridExcelIO.XLSExport(filename);


Delphi project & source files for downloading included in the main demos distribution for Delphi.

Copyright © 1995 - 2012 TMS Software v3.4