Search in sources :

Example 1 with ExternalLinkDocument

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

the class ExternalLinksTable method writeTo.

public void writeTo(OutputStream out) throws IOException {
    ExternalLinkDocument doc = ExternalLinkDocument.Factory.newInstance();
    doc.setExternalLink(link);
    doc.save(out, DEFAULT_XML_OPTIONS);
}
Also used : ExternalLinkDocument(org.openxmlformats.schemas.spreadsheetml.x2006.main.ExternalLinkDocument)

Example 2 with ExternalLinkDocument

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

the class ExternalLinksTable method readFrom.

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

Aggregations

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