DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=34564>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34564 ------- Additional Comments From [EMAIL PROTECTED] 2005-04-25 16:23 ------- I am adding a very simple code which will compile and I am facing same problem with this simple code. The genarated excel file looks very strange. Could it be something with my excel template ? package no.nordea.klow.web.actions; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletOutputStream; import javax.servlet.ServletException; import java.io.IOException; import java.io.FileInputStream; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.poifs.filesystem.POIFSFileSystem; public class ExcelServlet extends HttpServlet { private final static String CONTENT_TYPE = "application/vnd.ms-excel"; private ServletOutputStream out; public void init() throws ServletException { } public void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("doDelete method entered"); } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("doGet method entered"); out = response.getOutputStream(); response.setContentType(CONTENT_TYPE); HSSFWorkbook workbook = null; try { POIFSFileSystem fsfilesystem = new POIFSFileSystem(new FileInputStream("C:\\MO\\nordea.xls")); workbook = new HSSFWorkbook(fsfilesystem); workbook.write(out); out.close(); } catch (Exception e) { e.printStackTrace(); } } } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
