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
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.
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";
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.
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;
}
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