Roberto contributed this functionality to POI - Thanks!

Here is the bugzilla titled - [PATCH] Implementation of an XLSX to XML Exporter using Custom XML Mapping
https://issues.apache.org/bugzilla/show_bug.cgi?id=47520

When he says that it requires a Custom Mapping to work then that must be true.

You could try patching in a default mapping.

Good luck,
Dave

On Oct 16, 2009, at 9:59 AM, Dhaval Parekh wrote:

Thanks for the reply.

I just have to convert a xlsx to xml.
I do not have any custom mappings defined.

This is what I am doing at the moment and its throwing an exception
java.io.IOException: error: Illegal XML character: 0x3
org.apache.xmlbeans.impl.piccolo.io.IllegalCharException:
Illegal XML character: 0x3 at
(UTF8XMLDecoder.java:196)

My code is below

File inputfile = new File("test.xlsx");
FileInputStream inp = new FileInputStream(inputfile);
MapInfo info = new MapInfo();


info.readFrom(inp);
//this is where its throwing an error above


XSSFMap xmap = info.getXSSFMapById(0);
CTMap ctMap = null;
XSSFExportToXml ex = new XSSFExportToXml(xmap);
OutputStream writer = new FileOutputStream("outxml.txt");                     
ex.exportToXML(writer ,false);

Thanks a lot for your help




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to