This question is locked. New answers and comments are not allowed.
Hello Telerikians.
After an Excel Export using the Telerik Export Format tools, I want to import back the Exce(.xls) document in a Gridview.
To do this I use the RadDocument class and the HTMLFormatProvider, as the Exported .xls files are in fact html formatted.
But how can I import my RadDocument in a RadGridview ?
here is my code
by advance Regards.
:)
After an Excel Export using the Telerik Export Format tools, I want to import back the Exce(.xls) document in a Gridview.
To do this I use the RadDocument class and the HTMLFormatProvider, as the Exported .xls files are in fact html formatted.
But how can I import my RadDocument in a RadGridview ?
here is my code
using Telerik.Windows.Documents.FormatProviders; using Telerik.Windows.Documents.FormatProviders.Txt; using Telerik.Windows.Documents.FormatProviders.Xaml; using Telerik.Windows.Documents; using Telerik.Windows.Documents.Model; using Telerik.Windows.Documents.FormatProviders.Html; public RadDocument ImportExcelDataClick(object sender, RoutedEventArgs e) { RadDocument document = null; IDocumentFormatProvider provider = new HtmlFormatProvider(); OpenFileDialog openDialog = new OpenFileDialog(); openDialog.Filter = "Excel Files|*.xls"; openDialog.Multiselect = false; bool? dialogResult = openDialog.ShowDialog(); if (dialogResult == true) { using (Stream stream = openDialog.File.OpenRead()) { document = provider.Import(stream); } } return document; } by advance Regards.
:)