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

Problem with ExcelExporting

9 Answers 197 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nataly
Top achievements
Rank 1
Nataly asked on 29 Jul 2009, 03:24 PM
Hello, telerik!

I have some problem, connected with this grid. An event "ExcelExportCellFormatting" isn't raised when the grid is in process of exporting to excel.How can i call this event other way?

9 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Jul 2009, 07:20 AM
Hi,

OnExcelExportCellFormatting event is raised when RadGrid is exported to Excel (before the resulting document is rendered on the client). I am not sure what is happening on your end. Can you confirm that you have added the event handler for the OnExcelExportCellFormatting event in the RadGrid.

ASPX:
 
 <telerik:RadGrid ID="RadGrid1" Width="800px" runat="server" Skin="Default" AllowMultiRowEdit="true" DataSourceID="SqlDataSource1" 
OnExcelExportCellFormatting="RadGrid1_ExcelExportCellFormatting"  > 


Thanks
Shinu
0
Nataly
Top achievements
Rank 1
answered on 30 Jul 2009, 02:14 PM
Yes, I do it. And I fill my grid not through SqlDataSource, but in C# code in Page_Load. 

RadGrid1.DataSource = GetSummaryContracts();
RadGrid1.DataBind();

There is a button on the page. 

protected void Button1_Click(object sender, System.EventArgs e)
{
     RadGrid1.MasterTableView.ExportToExcel();
}
  

I want to format a view of my grid in Excel through OnExcelExportCellFormatting. But this event isn't raised. I use RadControls_for_ASP.NET_2008_3_1105_source. I will be pleased any help 
0
Shinu
Top achievements
Rank 2
answered on 31 Jul 2009, 04:47 AM
Hi,

I am not sure what is happening on your end. I am using RadControls for asp.net AJAX(2009.1.311.20). Try upgrading to the latest version and see whether it  helps.
Updating RadControls for ASP.NET to another version or license

Thanks
Shinu
0
Nataly
Top achievements
Rank 1
answered on 31 Jul 2009, 07:08 AM
Example

Can you see my example, please. I have updated a version of telerik-controls, but unfortunatly the event ExcelExportCellFormatting will be not raised, if you click ImageButton1
0
Nataly
Top achievements
Rank 1
answered on 31 Jul 2009, 10:03 AM
Thank you!!! I'v already solved my problem!
0
Jon Chan
Top achievements
Rank 1
answered on 31 Jul 2009, 03:13 PM
Hi,

I was wondering if you could let me know how you fixed your problem.  My event is not being raised either.  My telerik controls are updated, and it is also being called.

Thanks.
0
Nataly
Top achievements
Rank 1
answered on 31 Jul 2009, 07:58 PM
Hello, I've added RadAjaxManager and it is working now. 
0
Michael Pappas
Top achievements
Rank 1
answered on 06 Jul 2010, 06:49 PM
It seems that the ExcelExportCellFormatting event handler is only fired when the Excel Export format is set to GridExcelExportFormat.HTML.  ExcelMLdoes not cause the event to fire.
0
Daniel
Telerik team
answered on 06 Jul 2010, 09:54 PM
Hello Michael,

ExcelMLRowCreated and ExcelMLStylesCreated fire when using the ExcelML export. ExcelExportCellFormatting fires when the format is HTML Excel.

For more information:
Word/Excel export (HTML-based) help topic
ExcelML export help topic

Best regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Nataly
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Nataly
Top achievements
Rank 1
Jon Chan
Top achievements
Rank 1
Michael Pappas
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or