rkd80
rkd80

Reputation: 421

Using Apache POI to write out XML from Excel

I have a need to convert my excel files into XML. Currently I have a tool that uses POI that spits out 2010 excel files (xlsx), but I would like to extend that further and have it spit out XML as well.

I can't seem to find any explicit examples of how to do that in POI, but searching suggests it is possible. Was hoping someone would have some direct experience with this?

thanks!

Upvotes: 6

Views: 6836

Answers (2)

winchella
winchella

Reputation: 172

I've never used POI directly, though I've used Apache Tika (which implements POI) to do something similar. The parser/handler interface automatically converts a document into XML which you should be able to adjust for your own purposes.

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

Upvotes: 2

mavrav
mavrav

Reputation: 580

Check out www.servingxml.com. It converts excel/csv to XML. No Java code involved. All you have to create transformation xml file which is very easy to do. Lots of examples in the site.

Upvotes: 1

Related Questions