Rene de Vries
Top achievements
Rank 1
Rene de Vries
asked on 17 Jun 2009, 02:01 PM
Simple question :)
Is it possible to assign a name to the Excel file worksheet created via RadGrid.MasterTableView.ExportToExcel() ? I've noticed that the sheet automatically gets the same name as the given filename, but I would like to be able to change that.
Is it possible to assign a name to the Excel file worksheet created via RadGrid.MasterTableView.ExportToExcel() ? I've noticed that the sheet automatically gets the same name as the given filename, but I would like to be able to change that.
4 Answers, 1 is accepted
0
Hello Rene,
It depends on the Export engine you use. It is possible to change the worksheet name for ExcelML only. Microsoft Excel automatically sets the worksheet name (equal to the file name) when using the HTML format.
Best regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
It depends on the Export engine you use. It is possible to change the worksheet name for ExcelML only. Microsoft Excel automatically sets the worksheet name (equal to the file name) when using the HTML format.
Best regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Hello all,
I was asked about how to change the name of the worksheet when exporting to ExcelML.
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I was asked about how to change the name of the worksheet when exporting to ExcelML.
protected void RadGrid1_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e) |
{ |
... |
e.Worksheet.Name = "my worksheet"; |
} |
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Srujan
Top achievements
Rank 1
answered on 19 Sep 2013, 03:22 PM
Hi Daniel ,
When I try to include RadGrid1_ExcelMLExportRowCreated() event sheet name changes but no data is exported to excel .Below is the code I am using ,can you please suggest how to proceed further .
When I try to include RadGrid1_ExcelMLExportRowCreated() event sheet name changes but no data is exported to excel .Below is the code I am using ,can you please suggest how to proceed further .
RadGrd1.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
RadGrd1.PageSize = RadGrd1.MasterTableView.VirtualItemCount;
RadGrd1.ExportSettings.IgnorePaging = true;
RadGrd1.ExportSettings.OpenInNewWindow = true;
RadGrd1.ExportSettings.ExportOnlyData = true;
RadGrd1.ExportSettings.FileName = "FileName";
RadGrd1.MasterTableView.ExportToExcel();
Thanks
0
Hi Srujan,
Try setting the UseAllDataFields to true as shown below:
Regards,
Daniel
Telerik
Try setting the UseAllDataFields to true as shown below:
<
MasterTableView
UseAllDataFields
=
"true"
.....>
....
</
MasterTableView
>
Regards,
Daniel
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.