- Ignore all properties and non-generic meethods because you are always interested in a specific type. (There is no generic property.)
- Use only AppendChild(...) rather than mix PrependChild(...) and AppendChild(...)
- ParagraphProperties must come before Paragraph to take effect.
- RunProperties must come before Run to take effect.
- FirstLinecChars and HangingChars of the Indentation 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.