Using Apache POI to extract XML from Excel

I need to convert excel files to XML. I currently have a tool that uses a POI that spills out 2010 excel files (xlsx), but I would like to expand this further and make it spit out XML.

I cannot find explicit examples of how to do this in the POI, but the search suggests that this is possible. Was there anyone hoping that someone would have direct experience?

thanks!

+6
source share
2 answers

I have never used a POI directly, although I used Apache Tika (which implements a POI) to do something like this. The analyzer / handler interface automatically converts the document to XML, which you can customize for your purposes.

https://tika.apache.org/1.2/parser.html

+2
source

Check out www.servingxml.com. It converts excel / csv to XML. No java code. Everything you need to create an XML conversion file is very easy to do. Many examples on the site.

+1
source

All Articles