Next: , Previous: , Up: Top   [Contents][Index]


D SPSS Viewer File Format

SPSS Viewer or .spv files, here called SPV files, are written by SPSS 16 and later to represent the contents of its output editor. This chapter documents the format, based on examination of a corpus of about 500 files from a variety of sources. This description is detailed enough to read SPV files, but probably not enough to write them.

SPSS 15 and earlier versions use a completely different output format based on the Microsoft Compound Document Format. This format is not documented here.

An SPV file is a Zip archive that can be read with zipinfo and unzip and similar programs. The final member in the Zip archive is a file named META-INF/MANIFEST.MF. This structure makes SPV files resemble Java “JAR” files (and ODF files), but whereas a JAR manifest contains a sequence of colon-delimited key/value pairs, an SPV manifest contains the string ‘allowPivoting=true’, without a new-line. (This string may be the best way to identify an SPV file; it is invariant across the corpus.)

The rest of the members in an SPV file’s Zip archive fall into two categories: structure and detail members. Structure member names begin with outputViewernnnnnnnnnn, where each n is a decimal digit, and end with .xml, and often include the string _heading in between. Each of these members represents some kind of output item (a table, a heading, a block of text, etc.) or a group of them. The member whose output goes at the beginning of the document is numbered 0, the next member in the output is numbered 1, and so on.

Structure members contain XML. This XML is sometimes self-contained, but it often references detail members in the Zip archive, which are named as follows:

prefix_table.xml and prefix_tableData.bin
prefix_lightTableData.bin

The structure of a table plus its data. Older SPV files pair a prefix_table.xml file that describes the table’s structure with a binary prefix_tableData.bin file that gives its data. Newer SPV files (the majority of those in the corpus) instead include a single prefix_lightTableData.bin file that incorporates both into a single binary format.

prefix_warning.xml and prefix_warningData.bin
prefix_lightWarningData.bin

Same format used for tables, with a different name.

prefix_notes.xml and prefix_notesData.bin
prefix_lightNotesData.bin

Same format used for tables, with a different name.

prefix_chartData.bin and prefix_chart.xml

The structure of a chart plus its data. Charts do not have a “light” format.

prefix_pmml.scf
prefix_stats.scf
prefix_model.xml

Not yet investigated. The corpus contains few examples.

The prefix in the names of the detail members is typically an 11-digit decimal number that increases for each item, tending to skip values. Older SPV files use different naming conventions. Structure member refer to detail members by name, and so their exact names do not matter to readers as long as they are unique.


Next: , Previous: , Up: Top   [Contents][Index]