DOC Subcommand (OUTPUT EXPORT Command)
The DOC
subcommand exports Viewer documents in Word XML format. Pivot tables and
text are exported as Word XML (*.docx) with all formatting attributes intact
(for example, cell borders, font styles, and background colors). Charts, tree diagrams, and model
views are included as high-resolution images (*.eps for macOS and
*.emf for Windows).
DOCUMENTFILE Keyword
The required DOCUMENTFILE
keyword
specifies the name of the Word document. The keyword is followed by
an equals sign and a quoted file specification, as in:
OUTPUT EXPORT
/DOC DOCUMENTFILE='/mydocs/myresults.docx'.
PAGESIZE Keyword
The PAGESIZE
keyword controls
the page dimensions of the exported document. The keyword is followed
by an equals sign and one of the following alternatives:
INCHES(width, height). Height and width specified in inches. Both values are required and both must be positive numbers.
MM(width, height). Height and width specified in millimeters. Both values are required and must be positive numbers.
- The default page dimensions are the default settings for the default printer.
- The orientation of the page is implied by the dimensions. Specifying a width that is less than the height is equivalent to choosing portrait orientation for the page. Specifying a width that is greater than the height is equivalent to choosing landscape orientation.
Note: the page size width setting is ignored if WIDETABLES=ASIS and one or more pivot tables is wider than the specified width. The page width automatically expands to accommodate the widest table.
TOPMARGIN, BOTTOMMARGIN, LEFTMARGIN, and RIGHTMARGIN Keywords
These keywords control the margins for the exported document. Each keyword is followed by an equals sign and one of the following alternatives:
INCHES(n). Margin specified in inches. The value must be a positive number.
MM(n). Margin specified in millimeters. The value must be a positive number.
NOTESCAPTIONS Keyword
The NOTESCAPTIONS
keyword controls the inclusion
of pivot table footnotes and captions in the exported document. The
keyword is followed by an equals sign and one of the following alternatives:
YES. Include footnotes and captions. This is the default.
NO. Do not include footnotes and captions.
WIDETABLES Keyword
The WIDETABLES
keyword controls
the treatment of pivot tables that are too wide for the document width
(the specified page width minus the left and right margins). The keyword
is followed by an equals sign and one of the following alternatives:
WRAP. Wrap wide tables. The table is divided into sections that will fit within the defined document width. Row labels are repeated for each section of the table. This is the default. If the row labels are too wide for the defined document width, the table is exported without wrapping and will appear truncated in the document.
SHRINK. Shrink wide tables to fit within the document width. Font size and column width are reduced so that the table fits within the document width.
ASIS. Do not shrink or wrap wide tables. The document width expands to accommodate the widest table.
PAGEBREAKS keyword
If you have inserted break points in pivot tables,
the PAGEBREAKS
keyword indicates
if these should be preserved in Word tables.
Yes. Break points and keep together groups are preserved in Word tables. This is the default.
No. Break points and keep together groups are ignored.
Example
OUTPUT EXPORT
/DOC DOCUMENTFILE='/mydocs/myresults.docx'
PAGESIZE=INCHES(11, 8.5)
TOPMARGIN=INCHES(1)
BOTTOMMARGIN=INCHES(1)
LEFTMARGIN=INCHES(1)
RIGHTMARGIN=INCHES(1)
NOTESCAPTIONS=NO
WIDETABLES=SHRINK.