spreadsheet « Excel « JSP-Servlet Q&A





1. HTML table to an Excel Spreadsheet    coderanch.com

This is the code i tried to serve an HTML table to an excel spreadsheet. <% response.setContentType("application/vnd.ms-excel"); %> I have this above code in a jsp page and when it runs it does not work. HTMLTable is a servlet ...

2. Passing object to excel spreadsheet    coderanch.com

This should give you a general idea, optimize it as appropriate. public static String hashToCSV(String headers, Hashtable hash) { StringBuffer sb = new StringBuffer(headers); for(Enumeration keys=hash.keys(); keys.hasMoreElements(); ) { Object key = keys.nextElement(); List value = (List)hash.get(key); boolean quoted = false; StringBuffer line = new StringBuffer(); /* // Uncomment this block if you need keys in the output String keyString = ...

3. Uploading Excel spreadsheet into JSP    coderanch.com