Search in sources :

Example 1 with SingleXmlCellsDocument

use of org.openxmlformats.schemas.spreadsheetml.x2006.main.SingleXmlCellsDocument in project poi by apache.

the class SingleXmlCells method writeTo.

protected void writeTo(OutputStream out) throws IOException {
    SingleXmlCellsDocument doc = SingleXmlCellsDocument.Factory.newInstance();
    doc.setSingleXmlCells(singleXMLCells);
    doc.save(out, DEFAULT_XML_OPTIONS);
}
Also used : SingleXmlCellsDocument(org.openxmlformats.schemas.spreadsheetml.x2006.main.SingleXmlCellsDocument)

Example 2 with SingleXmlCellsDocument

use of org.openxmlformats.schemas.spreadsheetml.x2006.main.SingleXmlCellsDocument in project poi by apache.

the class SingleXmlCells method readFrom.

public void readFrom(InputStream is) throws IOException {
    try {
        SingleXmlCellsDocument doc = SingleXmlCellsDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
        singleXMLCells = doc.getSingleXmlCells();
    } catch (XmlException e) {
        throw new IOException(e.getLocalizedMessage());
    }
}
Also used : SingleXmlCellsDocument(org.openxmlformats.schemas.spreadsheetml.x2006.main.SingleXmlCellsDocument) XmlException(org.apache.xmlbeans.XmlException) IOException(java.io.IOException)

Aggregations

SingleXmlCellsDocument (org.openxmlformats.schemas.spreadsheetml.x2006.main.SingleXmlCellsDocument)2 IOException (java.io.IOException)1 XmlException (org.apache.xmlbeans.XmlException)1