I am doing an advance search page, in which users can select the fields they want to search from a dropdown list, then search those fields from database and display them. My question is how I could display a dynamic search result page since the columns of search result are not fixed? And also how could user save those results as an excel file?
Any sample code or suggestion will be appreciated!
Senthil B Kumar
posted 10 years ago
exporting to an excel should not be a big deal. A simple solution for that would be , on click of the export to Excel button you can redirct to a diff page, which in background executes the same query and returns, only the frontend code will change when compared to the prior screen.
say if you are using JSP, initially set the mimetype to ms-excel and then construct a normal HMTL table.
If the users have MSExcel in thier PC, then this excel would automatically open in it as an excel sheet.
Work like you don't need the money. Love like you've never been hated. Dance like nobody's watching. Sing like nobody's listening. Live like it's Heaven on Earth.
Currently I Reside HereWEBlog