Hi,
Is it possible to export to Excel only the selected rows from a gridview using GridViewSpreadExport?
My code looks like this at the moment:
Using ms As New System.IO.MemoryStream
mspreadExporter = New GridViewSpreadExport(radDocuments) 'radDocuments is the gridview
Dim exportRenderer As New SpreadExportRenderer()
mspreadExporter.ExportFormat = SpreadExportFormat.Xlsx
mspreadExporter.ExportVisualSettings = False
mspreadExporter.HiddenColumnOption = HiddenOption.DoNotExport
mspreadExporter.ChildViewExportMode = ChildViewExportMode.ExportCurrentlyActiveView
mspreadExporter.SheetMaxRows = ExcelMaxRows._1048576
mspreadExporter.SheetName = "Report"
mspreadExporter.FileExportMode = FileExportMode.CreateOrOverrideFile
mspreadExporter.RunExport(ms, exportRenderer)
Using fileStream As New System.IO.FileStream(strFilename, IO.FileMode.Create, IO.FileAccess.Write)
ms.WriteTo(fileStream)
End Using
End Using