wood burning stoves 2.0*
The moose likes Java in General and the fly likes Converting Excel data table in to XML format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Converting Excel data table in to XML format " Watch "Converting Excel data table in to XML format " New topic
Author

Converting Excel data table in to XML format

Raj chiru
Ranch Hand

Joined: Aug 12, 2008
Posts: 141
Hi........
I have a data (Location Table) in Excel Sheet like this,



But How can i get this in XML format?




Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Check out http://faq.javaranch.com/java/AccessingFileFormats

I have especially good experience with JExcelAPI, but POI also can help you out.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Raj chiru
Ranch Hand

Joined: Aug 12, 2008
Posts: 141
Rob,
Thaks for your reply

could you help me with code for this?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

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

Joined: Aug 12, 2008
Posts: 141
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

Joined: Feb 12, 2009
Posts: 133
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
 
Consider Paul's rocket mass heater.
 
subject: Converting Excel data table in to XML format
 
Similar Threads
Export data to Excel in Websphere Portals
JTable
Excel Reporting
jsp to Excel using JExcel
Saving data to Excel files