public final class XSSFVMLDrawing extends POIXMLDocumentPart
In Excel 2007 VML drawings are used to describe properties of cell comments, although the spec says that VML is deprecated:
The VML format is a legacy format originally introduced with Office 2000 and is included and fully defined in this Standard for backwards compatibility reasons. The DrawingML format is a newer and richer format created with the goal of eventually replacing any uses of VML in the Office Open XML formats. VML should be considered a deprecated format included in Office Open XML for legacy reasons only and new applications that need a file format for drawings are strongly encouraged to use preferentially DrawingML
Warning - Excel is known to put invalid XML into these files! For example, >br< without being closed or escaped crops up.
See 6.4 VML - SpreadsheetML Drawing in Office Open XML Part 4 - Markup Language Reference.pdfDEFAULT_XML_OPTIONS
Modifier | Constructor and Description |
---|---|
protected |
XSSFVMLDrawing()
Create a new SpreadsheetML drawing
|
protected |
XSSFVMLDrawing(PackagePart part,
PackageRelationship rel)
Construct a SpreadsheetML drawing from a package part
|
Modifier and Type | Method and Description |
---|---|
protected void |
commit()
Save the content in the underlying package part.
|
protected schemasMicrosoftComVml.CTShape |
findCommentShape(int row,
int col)
Find a shape with ClientData of type "NOTE" and the specified row and column
|
protected List<org.apache.xmlbeans.XmlObject> |
getItems() |
protected schemasMicrosoftComVml.CTShape |
newCommentShape() |
protected void |
read(InputStream is) |
protected boolean |
removeCommentShape(int row,
int col) |
protected void |
write(OutputStream out) |
addRelation, clearMemoryPackagePart, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationCounter, getRelationId, getRelations, getTargetPart, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, read, rebase, removeRelation, removeRelation, toString
protected XSSFVMLDrawing()
XSSFSheet.createDrawingPatriarch()
protected XSSFVMLDrawing(PackagePart part, PackageRelationship rel) throws IOException, org.apache.xmlbeans.XmlException
part
- the package part holding the drawing data,
the content type must be application/vnd.openxmlformats-officedocument.drawing+xml
rel
- the package relationship holding this drawing,
the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawingIOException
org.apache.xmlbeans.XmlException
protected void read(InputStream is) throws IOException, org.apache.xmlbeans.XmlException
IOException
org.apache.xmlbeans.XmlException
protected List<org.apache.xmlbeans.XmlObject> getItems()
protected void write(OutputStream out) throws IOException
IOException
protected void commit() throws IOException
POIXMLDocumentPart
protected void commit() throws IOException {
PackagePart part = getPackagePart();
OutputStream out = part.getOutputStream();
XmlObject bean = getXmlBean(); //the "model" which holds changes in memory
bean.save(out, DEFAULT_XML_OPTIONS);
out.close();
}
commit
in class POIXMLDocumentPart
IOException
protected schemasMicrosoftComVml.CTShape newCommentShape()
protected schemasMicrosoftComVml.CTShape findCommentShape(int row, int col)
null
protected boolean removeCommentShape(int row, int col)
Copyright © 2020. All rights reserved.