I want do use some of my own converter from html table to xls table, but I don't know where to start. The google don't show me comprehensive results. I know about Apache tika and poi, but do they have something easy to build converter? I used to read POI docs but it's just says about converting from xls-to-html most of time. What you will suggest to read. Where to search? Thank you.
Asked
Active
Viewed 210 times
1 Answers
0
It's a two-step process. I'd advise you to keep them separate.
- Scrape and parse HTML to get table data
- Write table data into Excel.
If the HTML is XHTML your life gets better: All you need is an XML DOM parser and some code to find the node at the root of the tree with the data.
I prefer Andy Khan's JExcel to POI. I think it's far better for dealing with Excel.

duffymo
- 305,152
- 44
- 369
- 561
-
Duffymo, hey can I use jspx insted of xhtml. For my work it seems to be more related to my project to use jsp or jspx insted xhtml. They can be interchangeable(xhtml and jspx) to each other.?? – java_user Jun 13 '13 at 11:58
-
Don't know what you mean. A JSP is compiled to a servlet, which generates HTML for you. By the time your scraper sees it, it's HTML. If you write that JSP to generate well-formed XML, your scraper will have no problem parsing it. – duffymo Jun 13 '13 at 13:55
-
Thank you for your help duffymo. I'm thinking that anyway I will pass attributes, but what if I just take my model attributes and base on them build xml book??? Is it will work? – java_user Jun 13 '13 at 19:39
-
One question mark is enough. I've given you enough info. You haven't up voted or accepted anything yet. Why should I bother? – duffymo Jun 13 '13 at 20:01