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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid to excel problem

Thread ID:





67630 Aug 25,2007 10:21 AM UTC Sep 5,2007 09:09 PM UTC WinForms 3
Tags: GridControl
Asked On August 25, 2007 10:21 AM UTC


I have written two methods for exporting grid to excel.

in first one I have created my own custom class inheriting GridExcelConverterBase class.

in the second method i simply initilize an object of GridExcelConverter and call its gridToExcel method.

they both work fine but when I used any method and export the grid to excel, then other method starts to throw an exception
"type initilizer threw an exception".

and it is true for both side i.e. the method called first will work fine, and other one will start throwing exception.

sample solution is attached,
thanks syncfusion...


Rajagopal [Syncfusion]
Replied On August 29, 2007 04:57 AM UTC

Hi Alia,

Thanks for your interest in Syncfusion Products.

When a class initializer fails to initialize a type, a TypeInitializationException is created and passed a reference to the exception thrown by the type's class initializer. The InnerException property of TypeInitializationException will hold information on the underlying exception. Please take a look at the InnerException property of the TypeInitializationException. I will get back to you with the fixed version of the sample by tomorrow with more information.


Replied On August 31, 2007 03:16 PM UTC


Rajagopal [Syncfusion]
Replied On September 5, 2007 09:09 PM UTC

Hi Alia,

Sorry for the delay in getting back to you.

We have made a few chnages to your sample code and the below modifed sample works fine without any exception

Let me know if this helps.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon