Hi,
Il giorno 16/ott/09, alle ore 18:59, Dhaval Parekh ha scritto:
Thanks for the reply.
I just have to convert a xlsx to xml.
I do not have any custom mappings defined.
the error is reported because you have to load first the XLSX with the
XXSFWorkbook object and then retrive the MapInfo object loaded in it.
You can find an example on how to use the code here:
http://svn.apache.org/repos/asf/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java
Cheers,
Roberto
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]
--
Roberto Manicardi
=
=
=
========================================================================
http://www.jugroma.it
http://roma.javaday.it
JUG Roma Coordinator