Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 11th, 2006, 12:44 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to karephul
Default Converting Exel to XML


I have many Exel files so, just want to
automate the process of transforming exel
to XML document.

Any suggestions ??

 
Old June 11th, 2006, 09:00 PM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to karephul
Default

1. I should make a sax like parser of my own and implement my own
default handler, throw events and make a DOM, transform into the XML file, I am done !! Right


-> If i had a comma separated file I know, I have to throw even on
every String I get after the comma(something along this line), but
what property of exel file should I use to do this ??

2. I should find some Java API which can do this for me !!
but was unable to fine one !!


--> If you guys know one please let me know !!

Regards,
Pardeep Singh

 
Old June 14th, 2006, 03:27 PM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well i recently did the exact same thing . The csv thing is the only way to go i guess.The following is the way to go .

1] convert the excel to csv file using MSEXCEL .

2] now using the "split" command in java get the entire csv data into a ArrayList .

3] keep a method which would recognize the headers , so that they could be used as element names .

4] keep a method that would use the header name along with the corresponding data to write XML data in a file .

Hope this is good enuff







Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulties converting XML to XML using XSLT Reznik XSLT 7 June 3rd, 2008 05:45 AM
Converting Source Xml into Target Xml Using XSL. alapati.sasi XSLT 3 May 14th, 2007 10:54 AM
Converting XML to XML (making element mandatory) boondocksaint20 XSLT 8 April 28th, 2006 10:54 AM
Converting from binary to xml Morrislgn Pro VB.NET 2002/2003 0 February 2nd, 2006 12:46 PM
Converting xsd to xml lxu XML 0 June 4th, 2004 12:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.