By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,541 Members | 1,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,541 IT Pros & Developers. It's quick & easy.

How to generate Report in two sheets in xls using JSP??

P: 1
I am using the fallowing code.... This condition generats a two different excel sheet based on IF condition If(Condtion) { response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-disposition","attachment;filename="+deviceName+"_S pec"+".xls"); response.setHeader( "Pragma", "no-cache" ); MY CODE TO WRITE DATA ON 1St EXCEL SHEET } else { response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-disposition","attachment;filename="+deviceName+"_I ssue"+".xls"); response.setHeader( "Pragma", "no-cache" ); MY CODE TO WRITE DATA ON 2nd EXCEL SHEET } NOW I CAN GENERATE reprot on two excel sheet based on if condition.. Here i have to remove if else condition and i have to genrate a report in only one excel sheet such that... it should come in two different worksheet in the same excel sheet... In place of ELSE i have to add some thing so that it will come in next work sheet..... Can you plz help me.....
Jan 18 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.