We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Imports xls file into grid

Hi,

Can someone gives me de code line to fill a gridcontrol with an excel file.

Thank

Beginner must live and learn !!!!!

1 Reply

HA haneefm Syncfusion Team May 2, 2007 02:37 PM UTC

Hi Lecomte,

An excel sheet can also be imported to the GridControl using the ExcelToGrid method. The code to import the xls file is given below.

Syncfusion.GridExcelConverter.GridExcelConverterControl gecc = new Syncfusion.GridExcelConverter.GridExcelConverterControl();
gecc.ExcelToGrid( openFileDialog.FileName, this.gridControl1.Model);

Also refer to the ExcelExport_GridControl browser sample for more details.
C:\Program Files\Syncfusion\Essential Studio\4.4.0.49\Windows\Grid.Windows\Samples\Serialization\ExcelExport_GridControl

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon