use of org.openxmlformats.schemas.spreadsheetml.x2006.main.TableDocument in project poi by apache.
the class XSSFTable method readFrom.
/**
* read table XML
* @param is
* @throws IOException
*/
public void readFrom(InputStream is) throws IOException {
try {
TableDocument doc = TableDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
ctTable = doc.getTable();
} catch (XmlException e) {
throw new IOException(e.getLocalizedMessage());
}
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.TableDocument in project poi by apache.
the class XSSFTable method writeTo.
/**
* write table XML to stream
* @param out
* @throws IOException
*/
public void writeTo(OutputStream out) throws IOException {
updateHeaders();
TableDocument doc = TableDocument.Factory.newInstance();
doc.setTable(ctTable);
doc.save(out, DEFAULT_XML_OPTIONS);
}
Aggregations