It seems "bai" (the byte array) is corrupted. Try to save it on the file system with FileOutputStream and open it in Excel. If it still says there is an error then this is the problem.
On Wed, May 9, 2012 at 3:43 PM, khanshan <hakansende...@yahoo.com> wrote: > Hi there, > > I am almost handled my problem but. I have annoying problem with excel. > I get excell output file via > > ByteArrayResource byteArrayResource = new > ByteArrayResource("application/vnd.ms-excel", bai, "ayrint.xls"); > RequestCycle.get().scheduleRequestHandlerAfterCurrent(new > ResourceRequestHandler(byteArrayResource, null)); > > when I try to open excell file, it gives error as "errors on file" and > doesnt open, Do I have to add some more attributes in some functions or I do > mistakes while generating excell file? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620321.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org