• Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert XML to excel file  RSS feed

 
pratapj chandran
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
how to convert xml file to excel file using apache cocoon. I will give xml as input to the java file and it should give excel as output file. Also can you please refer some examples regarding this.

Advance Thanks
PratapC
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having never used Apache Cocoon (or knowing what it is), and knowing that MS Excel has its own XML file format, why not use XSLT to convert between your format to MS Excel format?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cocoon is a framework built around an XSLT transformation pipeline, so that would be a possibility.

But the question is whether you want an XML file Excel can read, or an .XLS file? XSLT can generate the former, but not the latter. If XLS is desired, you'd probably need to parse the XML yourself, and use the results to drive a library like Jakarta POI to generate the XLS file.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!