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

Export to Excel from ragGrid

5 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jean-Francois
Top achievements
Rank 1
Jean-Francois asked on 01 Oct 2008, 07:45 PM
Hi,

I using the fonction radGrid.MasterTableView.ExportToExcel() , and it work fine.

But  when I want to use the Excel file with the MailMerge fonctionality in word, it does not work. I found a workaround that is bizarre. I cut and paste the Excel content in a new Excel file and now it's working. This solution is not the best and not very professionnel to offer to my client. I you aware of this issue and do you have a solution for me ?

thanks
J-F

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 02 Oct 2008, 06:22 AM
Hello Jean-Francois,

Please try ExcelML export type instead and let me know about the result. Here is an example how to set this:

RadGrid1.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jean-Francois
Top achievements
Rank 1
answered on 02 Oct 2008, 06:24 PM
Hi Vlad,

your solution is not working, the excel file is empty with the RadGrid1.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML

here's my other export setting:

rdLeve.ExportSettings.ExportOnlyData =

true;

rdLeve.ExportSettings.IgnorePaging =

true;

rdLeve.ExportSettings.OpenInNewWindow =

true;

rdLeve.ExportSettings.FileName =

"ExportLeves";

0
Vlad
Telerik team
answered on 03 Oct 2008, 05:47 AM
Hello Jean-Francois,

How the grid is bound in your case?

Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jean-Francois
Top achievements
Rank 1
answered on 03 Oct 2008, 01:55 PM
with the

rdLeves_NeedDataSource event, here's the code:

protected void rdLeves_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

{

bool isDPVA = false;

if (Request.QueryString["isDPVA"] != null)

{

isDPVA = System.

Convert.ToBoolean(Request.QueryString["isDPVA"]);

}

Blc.DevRad.GRPA.Core.

VueLevesEtTranche VueLevesEtTrancheCore = new Blc.DevRad.GRPA.Core.VueLevesEtTranche();

List<Blc.DevRad.GRPA.Model.VueLevesEtTranche> ListVueLevesEtTranche;

if (isDPVA)

{

ListVueLevesEtTranche = VueLevesEtTrancheCore.GetAllVueLevesEtTrancheByTypeOctroi(

"DPVA");

}

else

{

ListVueLevesEtTranche = VueLevesEtTrancheCore.GetAllVueLevesEtTrancheByTypeOctroi(

"Options");

}

rdLeve.DataSource = ListVueLevesEtTranche;


}
0
Jean-Francois
Top achievements
Rank 1
answered on 03 Oct 2008, 02:19 PM
Hi,

just to let you know that I found a acceptable workaround solution, if the excel file is open while I am binding form word the excel sheet it's workinf fine, it's just with the excel file is close that the problem happen.

I think it is gone be ok for my client
Tags
Grid
Asked by
Jean-Francois
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jean-Francois
Top achievements
Rank 1
Share this question
or