This question is locked. New answers and comments are not allowed.
Hi,
I have a rad grid view in my web page(Silverlight), along with certain other components such as the text blocks, grid etc.I would like to know whether is it possible to export the other components to excel along with the rad grid view onto the same excel sheet??
For exporting the rad grid view to excel i use the following code,
and also I know I can export the other components as images using the following code,
My question is can i do both on to the same excel sheet? I mean i want both the rad grid view and the stack panel which contains text blocks on to the same excel sheet, is this possible? If so how do i go about it? Thank you in advance!
I have a rad grid view in my web page(Silverlight), along with certain other components such as the text blocks, grid etc.I would like to know whether is it possible to export the other components to excel along with the rad grid view onto the same excel sheet??
For exporting the rad grid view to excel i use the following code,
string
extension =
"xls"
;
string
selectedItem =
"Excel"
;
ExportFormat format = ExportFormat.ExcelML;
SaveFileDialog dialog =
new
SaveFileDialog();
dialog.DefaultExt = extension;
dialog.Filter = String.Format(
"{1} files (*.{0})|*.{0}|All files (*.*)|*.*"
, extension, selectedItem);
dialog.FilterIndex = 1;
if
(dialog.ShowDialog() ==
true
)
{
using
(Stream stream = dialog.OpenFile())
{
GridViewExportOptions options =
new
GridViewExportOptions();
options.Format = format;
options.ShowColumnHeaders =
true
;
options.Encoding = Encoding.UTF8;
options.ShowColumnHeaders =
true
;
myRadGridview.Export(stream, options);
}
SaveFileDialog dialog =
new
SaveFileDialog();
dialog.Filter =
"Excel File| *.xls"
;
dialog.DefaultExt =
"xls"
;
if
(dialog.ShowDialog() ==
true
)
{
using
(Stream file = dialog.OpenFile())
{
Telerik.Windows.Media.Imaging.ExportExtensions.ExportToExcelMLImage(myStackPanel, file);
}
}