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

RadGridviewExcelExporter errors on Citrix

2 Answers 40 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 1
Gary asked on 10 Oct 2011, 07:39 PM

Greetings all

I have a simple winform app that loads a RadGridView and optionally exports it to Excel.  The app works fine in the Development environment and as a standalone exe.  However, when the code is moved to Citrix, the invocation of the RadGridViewExporter.Export method triggers an Excel error: "an error occured and this feature is no longer functioning properly".  Once this error dialog is clicked, the export happens successfully.

I understand from various searches that this is likely a config issue with the server and not a Telerik internal problem.  My hope is that someone has hit this before and might suggest a work-around from the application side.

We are using VS2010, .Net 4.0, and Q2/2011 Radcontrols for Winforms.

Relevant code follows.  Many thanks for any advice.

 

private void Export(String filepath)

{

 

//this.radButtonExport.Enabled = false;

exporter =

 

new RadGridViewExcelExporter();

 

BackgroundWorker worker = new BackgroundWorker();

worker.DoWork +=

new DoWorkEventHandler(DoWork);

 
worker.RunWorkerCompleted +=

 

new RunWorkerCompletedEventHandler(bg_RunWorkerCompleted);

worker.RunWorkerAsync(filepath);

exporter.Progress +=

 

new ProgressHandler(exportProgress);

radProgressBar1.Visible = true;

 

radProgressBar1.Text =

 

string.Format("Exporting to {0}", filepath);

radProgressBar1.Width = radGridView1.Width * 2/3;

}

 

private void DoWork(object sender, DoWorkEventArgs e)

{

exporter.Export(radGridView1, (

 

String)e.Argument, "script results");

}

2 Answers, 1 is accepted

Sort by
0
Gary
Top achievements
Rank 1
answered on 10 Oct 2011, 07:55 PM
I should clarify that the described error message is all I see - in a modal window with title "Microsoft Excel".  Most threads I have followed that include this error text (for Excel and other Office apps) also contain requests to repair or reinstall objects.  I see none of that, unless the Exporter method is bubbling up an abbreviated version of the error.
Cheers
0
Martin Vasilev
Telerik team
answered on 13 Oct 2011, 08:35 AM
Hello Gary,

Thank you for writing.

Unfortunately, I am unable to test described scenario in Citrix environment. However, I can guess that you are experiencing issues because RadGridViewExporter uses Primary Interop Assemblies and requires installation of MS Office. 

I would suggest you to consider the newer ExportToExcelML method, which does not have such limitations. You will also benefit from the richer functionality which this exporting class offers, especially compared to RadGridViewExporter. More about ExportToExcelML you can find in our product documentation.

Let me know if you have any additional questions.

Greetings,
Martin Vasilev
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Tags
GridView
Asked by
Gary
Top achievements
Rank 1
Answers by
Gary
Top achievements
Rank 1
Martin Vasilev
Telerik team
Share this question
or