1. HTML table to an Excel Spreadsheet coderanch.comThis is the code i tried to serve an HTML table to an excel spreadsheet. |
2. Passing object to excel spreadsheet coderanch.comThis 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 |