This is a migrated thread and some comments may be shown as answers.

[Solved] Export to Excel in grid

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Asra
Top achievements
Rank 1
Asra asked on 08 Jun 2009, 11:23 AM
Hi,

I am trying to export radgrid to excel but I am getting "object reference not set to the istance of the object" error when I am trying to export in ExcelML format. Below is the code I am using:
        

protected

 

void btnExportExcel_Click(object sender, ImageClickEventArgs e)

 

{

 

//ConfigureExport();

 

 

this.radMainGrid.ExportSettings.OpenInNewWindow = true;

 

 

this.radMainGrid.ExportSettings.ExportOnlyData = true;

 

 

this.radMainGrid.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML;

 

 

this.radMainGrid.MasterTableView.ExportToExcel();

 

 

}

I am using a trial version of radgrid, is it bcoz of this that I am getting this error.
This is very urgent, please reply soon.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 08 Jun 2009, 01:57 PM
Hi Asra,

I followed your scenario in order to replicate the issue but to no avail.
Please find attached a small runnable application which handles the desired functionality. Give it a try and let me know if it works for you or if I am leaving something out.

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Asra
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or