Skip to content
Tutorials Center
My learning

Topics

Lesson 33 of 39 ยท Charts and Output

Working with Pivot Tables and Exporting SPSS Output

Edit SPSS pivot tables, pivot rows and columns, change number formats and TableLooks, copy to Word, export to Word, PDF or Excel, and control the Output Viewer.

Every SPSS procedure sends its results to the Output Viewer, mostly as pivot tables. Understanding the viewer saves hours: you can reformat tables so they are ready for a report, hide what you do not need, and export everything in one step instead of copying cell by cell.

The Output Viewer layout

The window has two panes.

  • The outline pane (left) lists every item: Log, Title, Notes, each table and chart. Click an item to jump to it. Click the minus beside a block to collapse it. Drag items to reorder, or delete items you do not need. Hidden items stay in the file but do not print or export.
  • The content pane (right) shows the actual tables and charts.

A new viewer window opens with the first output; further procedures append to the same viewer unless you make a new one (File > New > Output). Each analysis starts with its Log (the command that ran, printed if "Display commands in the log" is on), then the tables.

Good habits: delete accidental runs, add a Title or Text (Insert > New Title / New Text) before each analysis, and save the viewer as .spv.

What a pivot table is

A pivot table is not a picture: it is a structured table with dimensions (rows, columns, layers) whose cells you can rearrange. Double-click it to enter edit mode.

  • Pivot Trays (Pivot > Pivot Trays): drag dimension icons between Row, Column and Layer to reshape the table. A Crosstabs table, for instance, can have its statistics (Count, Expected Count, % within) moved from rows to columns.
  • Transpose Rows and Columns (Pivot menu) swaps them in one click.
  • Layers: a third dimension shown as a drop-down. Moving a dimension to a layer lets you "flip through" groups.
  • Format numbers: select cells, Format > Cell Properties > Format Value for decimals, percentages, or significance display. Right-click > Cell Properties works as well.
  • Edit text: double-click a title, label or footnote and type.
  • Hide or show: select a row or column and choose Hide Category (right-click), or double-click the dimension and use Show All Categories. Hiding the "Total" or an unneeded statistic tidies the table.

SPSS stores the full precision of each cell. What you see is only the formatting. Changing the decimals changes display, not the value.

TableLooks

A TableLook is a saved style: fonts, borders, shading, alignment. Choose Format > TableLooks to pick one (for example "Academic" or "Compact"), edit it, and Save As. To make a look the default for all new tables, set it in Edit > Options > Pivot Tables > TableLook. A journal-style look (no vertical lines, thin rules above and below) cuts later editing in Word.

Copying results

  • Select a table in the outline or content pane and Edit > Copy pastes a rich table into Word (with formatting). Copy Special offers options such as plain text, image, or as a Word table.
  • For a single cell value use the copy-with-precision option: copy as text to keep the full decimals.
  • Copy charts as images; right-click and choose Copy.

Exporting the whole viewer

File > Export opens the dialog.

  1. Objects to Export: All, All visible, or Selected.
  2. Document Type: Word/RTF, Excel, PowerPoint, PDF, HTML, Web report, Text, or Image files (charts only), and in newer versions OpenDocument.
  3. File name: choose a path. The Change Options button controls details such as page orientation or whether to include layers.
  4. OK writes the file.

Paste writes the equivalent command so you can repeat it:

Text
OUTPUT EXPORT
  /CONTENTS EXPORT=VISIBLE
  /DOC DOCUMENTFILE='C:\Reports\results.docx'.

(The exact subcommand keywords depend on the version and format. Use Paste from the dialog to get the right ones for your setup.)

OMS: capturing results as data

The Output Management System diverts selected output to a data file or a file format instead of showing it, for example saving all t test tables as an SPSS dataset or CSV so you can build a custom summary. Utilities > OMS Control Panel builds the commands. It is how automated reports are made, and one of the reasons syntax matters.

Custom tables and descriptive reports

With the Custom Tables module (extra licence) you can design report tables directly. Without it, the base procedures Analyze > Reports > Case Summaries and Report Summaries in Rows/Columns, plus Descriptive Statistics > Frequencies/Descriptives/Crosstabs, cover most needs. The Frequencies and Crosstabs procedures can also print tables directly in a report-friendly layout.

Python Stand-in: pivoting a table (rows and columns swapped)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The numbers are made-up display values, not real output. Pivoting changes the arrangement but not the data, just like Transpose Rows and Columns in SPSS.

Python Stand-in: formatting numbers for a report

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Common mistakes

  • Editing numbers in a pasted Word table and forgetting to update the text.
  • Leaving "Sig. = .000" in the report.
  • Exporting with hidden tables still included (check Objects to Export).
  • Not saving the .spv; only the viewer file lets you edit the pivot tables later.
  • Re-running an analysis three times and keeping all copies.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. How do you open a pivot table for editing?

    Double-clicking activates the table so you can edit text, formats and pivot trays.
  2. 2. What does Transpose Rows and Columns change?

    It swaps the row and column dimensions; the data stay the same.
  3. 3. Which menu exports the whole Output Viewer to Word or PDF?

    File > Export lets you choose objects, document type and file name.
  4. 4. What is a TableLook?

    TableLooks store fonts, borders and shading so tables share one style.

Summary

  • The Output Viewer has an outline pane and a content pane; tidy and title your output.
  • Pivot tables can be reshaped with Pivot Trays, transposed, hidden and reformatted.
  • TableLooks give consistent formatting; display decimals do not change stored values.
  • File > Export or OUTPUT EXPORT writes the output to Word, PDF, Excel or HTML; OMS captures output as data.

Next: SPSS Syntax Basics