Extracting data from xml spreadsheet for JSP

Hi,

Currently i am developing a web application where user can upload a MS excel file, then the application will extract data needed and store into database. But facing problems where those excel files may content massive images that make the file size too large to be upload on to the web. Now i try to export those excel files into xml spreadsheet, to get only text data. Need helps on how toextract data from xml spreadsheet. Which API needed?

Thanks

[480 byte] By [dennisleea] at [2007-10-3 10:30:17]
# 1
Does the xml file conform to Microsoft DTD for an xls file? If so then visit Sourceforge and have a look at the SpreadsheetML - or Xelem - project.
Tillermana at 2007-7-15 5:52:56 > top of Java-index,Java Essentials,Java Programming...
# 2
The simplest format which all spreadsheet programs can produce is CSV (and that's guaranteed image-free). It's also simple to read.
malcolmmca at 2007-7-15 5:52:56 > top of Java-index,Java Essentials,Java Programming...
# 3
Or, you could work directly with the xls file itself using Jexcel, or the HSSF package from the Apache Organisations POI project.Must admit however that I do agree, csv could be the way to go.
Tillermana at 2007-7-15 5:52:56 > top of Java-index,Java Essentials,Java Programming...
# 4
What means by Microsoft DTD? I selected XML SpreadSheet file format when i save the original MS excell file. Then i get a new file with .xml extension.
dennisleea at 2007-7-15 5:52:56 > top of Java-index,Java Essentials,Java Programming...
# 5

Without getting into too much detail, a DTD defines the elements that can appear in an xml file, the order they can appear in, which elements can be nested within which other elements, what each element can contain, etc, etc. In short, a DTD defines the structure of the xml file and Microsoft defined a DTD for the xml files that are output by Excel.

This is not taken from an xml file produced by Excel but DTDs look a llittle like this very basic example.

<!DOCTYPE note [

><!ELEMENT note (to,from,heading,body)>

<!ELEMENT to(#PCDATA)>

<!ELEMENT from(#PCDATA)>

<!ELEMENT heading (#PCDATA)>

<!ELEMENT body(#PCDATA)>

]>

If you open the one produced for you by Excel in Wordpad or another simple text editor, you may see something like this in there.

However, if you are going to use a parser to access the file for you do not worry about getting to grips with DTDs for a short, simple project.

Tillermana at 2007-7-15 5:52:56 > top of Java-index,Java Essentials,Java Programming...