Problem in accessing Excel from my Java application
Purpose : I want to show some data from my oracle database in the form of excel sheet. For this I'm using POI Toolkit
which is open source code available on apache' site.
Now the problem is when I write to FileOutputStream, it works fine. But when I write to outputstream, it gives me junk values.
I have created a wraper class - ExcelGenerator and this the code I'm using in the the test jsp
OutputStream os = response.getOutputStream();
FileOutputStream fs = new FileOutputStream("MyWorkbook.xls");
System.out.println("Output Stream = "+os.toString());
ExcelGenerator eg = new ExcelGenerator();
HSSFWorkbook wb = eg.getWorkBook();
Any clues/ suggestions most welcome
have a look at http://java2.5341.com/msg/44383.html and
see if it helps.
Hope this helps
Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, and if they get mad, you are a mile away and you have their shoes ;-)
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL