GetOutputOptions Method (Python)

Returns the value of the specified export option for this output document, as a string.

Syntax

SpssOutputDoc.GetOutputOptions(option)

Parameters

The available values for the option parameter are (specify the value without quotes):

SpssClient.DocExportOption.ExcelSheetNames. Specifies the name of the sheet to which items will be exported. This option only applies when exporting to Excel.

SpssClient.DocExportOption.ExcelStartingCell. Specifies the starting cell for exporting to Excel. Applies when SpssClient.DocExportOption.ExcelLocationOptions is set to “OverwriteAtCellRef”.

SpssClient.DocExportOption.ExcelOperationOptions. Specifies whether a new workbook is created, a new worksheet is created, or an existing worksheet is modified. This option only applies when exporting to Excel.

  • "CreateWorkbook". A new workbook is created. If the specified file exists, it is overwritten.
  • "CreateWorksheet". A new worksheet is created within the specified workbook. The name of the sheet is given by the setting of SpssClient.DocExportOption.ExcelSheetNames. If a worksheet with the specified name already exists, that worksheet is overwritten. If the specified file does not exist, a new file is created with a worksheet with the specified name.
  • "ModifyWorksheet". Modifies the contents of an existing worksheet. The name of the sheet is given by the setting of SpssClient.DocExportOption.ExcelSheetNames. Export of charts, model views, and tree diagrams is not supported with "ModifyWorksheet".

SpssClient.DocExportOption.ExcelLocationOptions. Specifies how items will be added to a worksheet. This option only applies when exporting to Excel.

  • "AddColumns". Specifies that items will be added after the last column, starting in the first row, without modifying any existing contents.
  • "AddRows". Specifies that items will be added after the last row, starting in the first column, without modifying any existing contents.
  • "OverwriteAtCellRef". Specifies that items will be written to the location specified in SpssClient.DocExportOption.ExcelStartingCell. Any existing content in the area where the exported items are added will be overwritten.

SpssClient.DocExportOption.WideTablesOptions. Specifies the treatment of pivot tables that are too wide for the document width (the specified page width minus the left and right margins). This option only applies when exporting to Word or PowerPoint.

  • "WT_Wrap". Specifies that tables are divided into sections that will fit within the defined document width. Row labels are repeated for each section of the table. 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.
  • "WT_Shrink". Specifies that font size and column width are reduced so that tables fit within the document width.
  • "WT_Extend". Specifies that tables that are too wide for the document width will appear truncated. All of the table content, however, is retained so expanding the document width will display additional table content.

The following options apply when exporting to Word or PowerPoint.

SpssClient.DocExportOption.ItemsPageHeight. A character representation of a positive number representing the page height, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsPageWidth. A character representation of a positive number representing the page width, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsTopMargin. A character representation of a positive number representing the top margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsBottomMargin. A character representation of a positive number representing the bottom margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsRightMargin. A character representation of a positive number representing the right margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsLeftMargin. A character representation of a positive number representing the left margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsMeasurementUnits. The units for specifying page dimensions and margins: "IExportOptions.MeasurementUnits.Inches", "IExportOptions.MeasurementUnits.Millimeters", "IExportOptions.MeasurementUnits.Centimeters", and "IExportOptions.MeasurementUnits.PrintPoints" (1/72 inch).