Hello,
I need to export radGridView into xls file throught ExportToExcelML. For these puprose I use this code
But on the last line of code (export.RunExport(....)) I get the exception "Worksheet collection cannot be empty." and the inner exception is empty.
Is there some problem in my code or it is some general problem of ExportToExcelML class?
Thank you for your response
Petr
I need to export radGridView into xls file throught ExportToExcelML. For these puprose I use this code
SaveFileDialog saveDialog = new SaveFileDialog(); |
saveDialog.DefaultExt = "xls"; |
saveDialog.Filter = "Excel (*.xls)|*.xls"; |
saveDialog.OverwritePrompt = true; |
saveDialog.CreatePrompt = true; |
if (saveDialog.ShowDialog() == DialogResult.OK) |
{ |
if (string.IsNullOrEmpty(saveDialog.FileName)) |
{ |
MessageBox.Show("Please enter a file name."); |
return; |
} |
ExportToExcelML export = new ExportToExcelML(); |
export.HiddenColumnOption = ExportToExcelML.HiddenOption.ExportAsHidden; |
export.HiddenRowOption = ExportToExcelML.HiddenOption.ExportAsHidden; |
export.RunExport(bestellungRadGridView, saveDialog.FileName, ExportToExcelML.ExcelMaxRows._65536, true); |
} |
But on the last line of code (export.RunExport(....)) I get the exception "Worksheet collection cannot be empty." and the inner exception is empty.
Is there some problem in my code or it is some general problem of ExportToExcelML class?
Thank you for your response
Petr