• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting Excel data table in to XML format

 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi........
I have a data (Location Table) in Excel Sheet like this,



But How can i get this in XML format?




 
Rob Spoor
Sheriff
Pie
Posts: 20661
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out http://faq.javaranch.com/java/AccessingFileFormats

I have especially good experience with JExcelAPI, but POI also can help you out.
 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob,
Thaks for your reply

could you help me with code for this?
 
Rob Spoor
Sheriff
Pie
Posts: 20661
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. But here's the Javadoc of JExcelAPI; the entry point is the jxl.Workbook class. From there you can get Sheets, from which you can get the Cells.
 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...Rob,
I have developed the code for convert Excel data in to xml format but it gives some errors,but i could not getting those.please see the code and help me and correct me any thing going wrong.



I got errors like this..
 
John Bengler
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raj,

the problem is that you are using a backslash ("\") as a path separator for the path to your excel file, try slash ("/") instead.

e.g. Java file paths

Java is using the backslash as a start of escape sequences.

e.g. Escape Sequences.

If you want to have a backslash in a java String you have to write "\\".



John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic