![]() The main problem with this scenario is that when the user clicks on the Export button, the data is currently held in a jqGrid on the user's browser. If you have hidden columns in your jqGrid, these will not get exported to Excel. To keep the code maintainable and easy-to-use, this new button simply needs to call a JavaScript function, passing it the name of your where your jqGrid is stored, and what you would like to call the Excel file:ĮxportJQGridDataToExcel( " #tblOrders", " CustomerOrders.xlsx") ![]() Our Goalĭuring this walkthough, we will add an "Export to Excel" button to our jqGrid, and when you click on it, we'll create a "real" Excel 2007. Note that this article assumes you are using Visual Studio, as it uses a. You'll also read lots of developers suggesting that this exporting can't be done. If you Google "jqGrid Export to Excel", you will get numerous hits, but none of them give an easy-to-use (and re-use !) way of doing this, without using third-party software or sending your data to a. ![]() ![]() The same goes for this jqGrid walkthrough. I've been overwhelmed by the feedback (and number of downloads) that this CodeProject article has received. CreateExcelFile.CreateExcelDocument(ds, " C:\\Sample.xlsx")
0 Comments
Leave a Reply. |