Hello Team,
I have a Hierarchial Grid . I'm using Infragistics UltraWebGridExcelExporter for exporting data to excel sheet . How do I export only the selected rows in the grid to excel. Any suggestions
Hello,
The default export mode of the ExcelExporter component is to download an Excel file, however, you can change the ExportMode to custom and manipulate workbooks on the server, then save the binary stream to any IO stream you wish.
For example:
UltraWebGridExcelExporter1.ExportMode = Infragistics.WebUI.UltraWebGrid.ExcelExport.ExportMode.Custom;wbk.Worksheets.Add("SpreadSheetName");this.UltraWebGridExcelExporter1.Export(this.UltraWebGrid1, wbk.Worksheets["SpreadSheetName"]);Infragistics.Excel.BIFF8Writer.WriteWorkbookToStream
For a detailed real-world example, please visit the following forum thread:
http://news.infragistics.com/forums/p/2285/14917.aspx
hi vijay,
i have some problems with exporttoexcel for an Ultrawebgrid.
I have 2 generate say 10 workbooks the names of which suppose i fetch from database. how do save the 10 files at a desired location instaed of a popuup screen coming.....
There are a couple of routes you ca take, depending on your setup:
1) Use the UltraWebGridDocumentExporter Class : RowExporting Event - if fires for each row exported and if the row is not in your Selected list, you can cancel the event - this will effectively not export the row
2) Create a completely different grid instance and bind it to a new collection, that contains only data from the selected rows, then export the second grid.
Hope this helps.