- OOXML has both non-generic methods and their non-generic methods. Ignore non-generic ones because you are interested in specific types in most cases.
- Use only
AppendChild(...)
rather than a mixture ofPrependChild(...)
andAppendChild(...)
ParagraphProperties
must come beforeParagraph
to take effect.RunProperties
must come before Run to take effect.FirstLinecChars
andHangingChars
of theIndentation
class are mutually exclusive.
Method | Meaning |
---|---|
Descendants() | Get children, grandchildren and so on |
Elements() | Get immediate children |
GetFirstChild() | Get the first child |
Method | Meaning |
---|---|
PrependChild(T) | Prepend a child |
AppendChild(T) | Append a child |
Append(IEnumerable) | Append children |
RemoveChild(T) | Remove a child |
RemoveAllChildren() | Remove all children |
ReplaceChild(OpenXmlElement, T) | Replace a child |
- Create a Word/Excel using OOXML does not load pre-installed add-ins because OOXML just creates a text file (XML). Even if a pre-installed add-in is to crash, you can safely create a Word/Excel using OOXML.
- PIA offers properly structured building blocks of Excel/Word. If you combine building blocks of PIA in an incorrect structure, you can notice your mistake at a build time. In contrast, OOXML only offers building blocks of Excel/Word with no structure. Using OOXML, you never know at a build time whether building blocks you are combining is in the proper structure.