How can i display values as a XLS file from database using servlet.That XLS file has a specific format and already its uploded in a specific folder location.I want to display data in specific filed in that XLS. [ November 26, 2006: Message edited by: Bear Bibeault ]
Is the XLS data in a file or in the database? Your post is not clear.
In either case, your servlet will obtain the data (either from the DB or by reading it from the file) and stream it to the response. Be sure to set the approriate repsonse headers before streaming the data.
Search this forum for previous discussions on setting the headers. Search for terms such as "context-type" and "content-disposition".
XLS data is in database.ya i have written proper content type.I am also getting data in XLS
Joined: Sep 19, 2006
but i want to get it in a specipic column .suppose in my XLS first three line is some text line which is fixed in that XLS. now i am retrieving employee id and name from database. i want to display these after first three rows and after that employee id will be 2nd column and employee name will be in 5th column.how to achieve this?
Prabhu's code simply returns the binary file data from the server to the client. If that's all you need - great! But otherwise, if you need to interpret the data (or, more importantly, if you need to interpret the spreadsheet data without having to buy a copy of M$ Office), then my link is applicable.
'Hope that helps .. PSM [ November 26, 2006: Message edited by: Paul Santa Maria ]