| Eric Qi, Suhas Sanjee |
Currently we rely heavily on RTF technology to create tables and listings. Microsoft has transitioned away from RTF in
favor of the XML-based Office Open XML (DOCX) format as the default standard for its Office suite. DOCX is based on
the Office Open XML standard, which is a modern, internationally-recognized standard for Office documents. DOCX
format offers better long-term compatibility and interoperability with other modern Office productivity software. The DOCX
format also offers superior support for structured documents. SAS can support generation of DOCX files using ODS.
However, this approach doesn’t meet all the requirements of our stakeholders. It lacks the level of customization needed
to accurately control page breaks and create non-editable tables, which are necessary features to prevent accidental
edits. In this paper, we describe an efficient approach using Office Open XML framework, SAS macros and Linux
commands to create non-editable tables in DOCX format. A DOCX file consists of multiple XML files compressed into a
single package. Using SAS, we can create an XML file with content extracted from a dataset, which can then be
combined with other parts of the DOCX package to produce a complete DOCX file. This not only modernizes our table
creation programs but also eliminates the current complex conversion step required to render RTF tables non-editable. |