• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Converting Excel data table in to XML format

 
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?




 
Sheriff
Posts: 21972
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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
Posts: 21972
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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..
 
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
 
    Bookmark Topic Watch Topic
  • New Topic