0

I'm trying to work with XSSFWorkbook in my web application. I ran a sample application with XSSFWorkbook as a plain Java program (with public static void main(String args[])) - it runs fine - an excel sheet is generated.

However, when I run the same piece of code in my java based web application - an instance of XSSFWorkbook is not instantiated. No Exception is thrown either!

Please help!

1 Answers1

0
the below code works perfectly fine for me

public void trackerUploadListener(FileUploadEvent event) throws Exception {
    UploadedFile tracker = event.getUploadedFile();
    XSSFWorkbook wb = null;
    InputStream stream = tracker.getInputStream();
    wb = new XSSFWorkbook(stream);  
}
Here, the listener is called from my xhtml page.
Yusuf Kapasi
  • 577
  • 2
  • 9