I am trying to find a way to export my igGrid to excel, pdf, etc. I have found some examples, but they are all for MVC, I am using asp.net. Any suggestions on how to get that done. I would like the grid to be exported as is with the same formatting as my grid. The datasource of the grid is json.
Thanks,
Saevar
Hi saevar,Thank you for posting in the community.I assume that you have referred to the following sample:http://samples.infragistics.com/jquery/infragistics-excel/create-excel-worksheetIn the above example, the exported Workbook is created manually using the datasource of the igGrid. Note that currently there is no exporter for the igGrid and the ASP.NET Excel engine can be used to create workbooks manually with the grid's data.
Similarly if you have an igGrid in a regular WebForm, you will need to create a workbook using the data bound to your grid (in this case your json). Useful guides for creating and customizing Workbooks can be found at:http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0?page=ExcelEngine_Using_the_Infragistics_Excel_Engine.htmlPlease let me know if you have any questions.
Hi Peter,
Due to project requirement, I am using ASP. I am also trying to find a way to export my igGrid to excel, pdf, etc. Any suggestions on how to get that done? I am searching online documents but cannot find any examples. Thanks
Patrick
Hi bcsite,
Thank you for posting in the community.
As I have mentioned above, the igGrid does not currently have its own exporter. Therefore I suggest that you use the Infragistics Excel and Document engines in order to export your data directly. More information on creating excel spreadsheets and reports using these can be found at:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=DocumentEngine_Writing_Reports.html
http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=ExcelEngine_Using_the_Infragistics_Excel_Engine.html
Please let me know if you have any questions.
Thank you for your prompt rely. I looked at the information on creating excel spreadsheets but cannot find full examples I need.
How do I add/reference Infragistics Excel Engine in a ASP?
Can I use the following VBA code in ASP and fill the sheet by set the value of each cells?
' Create a workbook and set its format to Excel2007Template Dim newWorkBook As Infragistics.Documents.Excel.Workbook = New Workbook(WorkbookFormat.Excel2007Template) ' Add a worksheet to the workbook Dim worksheet1 As Infragistics.Documents.Excel.Worksheet = newWorkBook.Worksheets.Add("Sheet1") ' Set the value of one of the cells worksheet2.Rows.Item(0).Cells.Item(0).Value = 14.56 ' Save the workbook newWorkBook.Save("C:\ExcelBookTemplate.xltx")
' Create a workbook and set its format to Excel2007Template
Dim
As
New
' Add a worksheet to the workbook
"Sheet1"
' Set the value of one of the cells worksheet2.Rows.Item(0).Cells.Item(0).Value = 14.56
' Set the value of one of the cells
' Save the workbook
"C:\ExcelBookTemplate.xltx"
Hi Patrick,
Thank you for your reply.
To answer your question, yes, you should be able to use the above approach to fill and save your workbook to a file.
Please let me know if you have any further questions.