title: Unable to generate download excel file on client side usinf poi mvc
body: <p>I am unable to generate an Excel file for download on the client side. This is the code I have:</p>
  
  <pre><code> &lt;%
   try{
    //Getting HSSFWorbook object from controller
      HSSFWorkbook wb= (HSSFWorkbook)pageContext.findAttribute("wb");
      response.setContentType("application/vnd.ms-excel");
      response.setHeader("Content-   Disposition","attachment;
      filename=ESTHotelPerfByMonthExcelReport.xls"
      );
    //Writing to output Stream 
  
      ServletOutputStream outputStream = response.getOutputStream();
      wb.write(outputStream);
      outputStream.flush();
   }//closing try
   catch (IOException ioe) { 
   }
  }//closing if
  
  
  //The above code is not generating any 
  // excel sheet however if i write the output to 
  // a    excel file it shows the all the data
  
   %&gt;
  </code></pre>