All systems

Statistical Files (SPSS, Stata, SAS)

SPSS, Stata, and SAS data files
Supported
Guide

Statistical software databases store research and analytical data with specialized metadata like variable labels, missing value codes, and data weights.

What You Can Upload

  • .sav and compressed .zsav files (SPSS)
  • .dta files (Stata, every format from the oldest, 102, to 119)
  • .sas7bdat files (SAS datasets, compressed or not)
  • .xpt files (SAS transport format, version 5; a file that holds several datasets gives one table for each)
  • ZIP archives with multiple files

What You Get Out

DataMeans converts your data into multiple modern formats:

OutputDescription
csv/{TableName}.csvOne CSV file per table with all row data
xlsx/{TableName}.xlsxExcel workbook per table (omitted for tables over 1,048,575 rows, 16,384 columns or 8,000,000 cells - see note below)
xls/{TableName}.xlsLegacy Excel format per table (omitted for tables over 65,535 rows, 256 columns or 150,000 cells - see note below)
json/{TableName}.jsonJSON array of records per table
json/{TableName}.jsonlNewline-delimited JSON (streaming-friendly)
postgres.sqlPostgreSQL CREATE TABLE + INSERT statements
mysql.sqlThe same schema and rows, in MySQL dialect
sqlite.sqlThe same schema and rows, in SQLite dialect
ansi.sqlThe same schema and rows, in portable ANSI SQL
sqlserver.sqlThe same schema and rows, in SQL Server (T-SQL) dialect
report.jsonStructured conversion report
report.mdHuman-readable conversion summary
codebook/{JobId}_codebook.jsonSPSS files: variable labels, value labels and missing-value codes

How to Export / Obtain Files

No special export needed - upload files directly:

  1. Locate your statistical data file
  2. Upload as-is or in a ZIP archive

Alternative exports from statistical software:

  • SPSS: File > Save As > SPSS Statistics (.sav)
  • Stata: export delimited using "filename.csv" (or save the dataset as .dta)
  • SAS: PROC EXPORT or save as .sas7bdat
  • SAS Transport v8: we read version 5. If your .xpt is version 8, re-export it: LIBNAME out XPORT "file.xpt"; PROC COPY IN=lib OUT=out; RUN;

Supported Features

  • Complete record extraction
  • SPSS files: variable labels, value labels and missing-value codes in a codebook beside the data; missing values, including declared ranges and text codes such as "NA", become empty values
  • Stata files of every format, the long strings (strL) of Stata 13 and later included; Stata's missing values . and .a to .z become empty values
  • SAS datasets compressed with COMPRESS=CHAR or COMPRESS=BINARY, from Windows, Unix and Linux alike
  • SAS rows deleted but still in the file are left out, and rows SAS moved within the file are read where they now are
  • Dates and times converted from each format's own day or second counts, in SAS's own date, datetime and time formats, the ISO 8601 ones (E8601DA, E8601DT, B8601TM...) included. A SAS TIME value past 24 hours stays a duration (25:00:00), as SAS shows it
  • Times keep their fractions of a second, to the millisecond
  • Text read in the encoding the file says it uses: SPSS and SAS files name their own, and Stata 14 and later files are UTF-8. Files that do not say (older SPSS files, Stata 13 and earlier) are read in the code page of the Database Origin you choose at upload. Two exceptions, for text written by one program and labelled by another: a Stata file that does not say, or a SAS file that does not say or says Latin-1, is read as UTF-8 when all its text is UTF-8 (as R and Python save Stata files, and as a SAS session keeps UTF-8 data it reads); and text in a Stata 14 file that is not UTF-8 (left so when Stata converted an older file) is read in that code page
  • Data type detection

Known Limitations

  • SPSS portable (.por) files are not read: save them in SPSS as .sav
  • A Stata format newer than 119 is not read yet; the job says so, and saveold filename, version(14) in Stata writes one we read
  • Stata's weekly, monthly, quarterly and half-yearly dates come out as Stata shows them (1964w41, 1973-07, 1977q1, 1977h2), not as a day
  • A date past the year 9999, usually a placeholder value, is left empty
  • Fractions of a second finer than a millisecond are rounded to the millisecond
  • SAS Transport version 8 (LIBV8) is recognised but not read yet; the upload preview and the job both say so and give you the one-line re-export above rather than failing vaguely
  • In a SAS Transport file of several datasets, one after the first that cannot be read (a damaged header, a file that stops partway through it) is left out and named in the job's warnings; the others are delivered. If the first cannot be read, or the file stops partway through it, the file is refused, in the upload preview and in the job. A transport file is a whole number of 80-byte records, so one that stops partway through a record is a download that stopped: copy it again from the original
  • A SAS file shorter than its own header says (a download that stopped, a copy cut short) is refused, in the upload preview and in the job, with the two sizes. It is not converted as far as it goes, because that would be a smaller dataset with nothing to tell you rows are missing: copy the file again from the original
  • Each file can be up to 50 MB, and so can a ZIP of them; the upload preview tells you when one is larger

Note on the Excel formats. An .xlsx sheet holds at most 1,048,575 rows of data and 16,384 columns, and a legacy .xls sheet 65,535 rows and 256 columns. Rather than ship a file that looks complete but is silently cut short, DataMeans leaves a table out of any Excel format it does not fit and notes it in the job report. The .xlsx copy is also left out for tables of more than 8,000,000 cells (1,048,575 rows of 12 columns is 12.6 million), which take too long and too much memory to write, and the .xls copy for tables of more than 150,000 cells, which the legacy format takes far too long to write. The CSV, JSON and SQL outputs always contain every row.

Technical reference

Overview

Statistical data files are proprietary formats used by statistical analysis software packages like SPSS, Stata, and SAS. These formats store datasets with variables, observations, and metadata optimized for statistical computing. They support complex data types, missing values, and metadata structures designed for quantitative research, data analysis, and statistical modeling in social sciences, economics, and scientific research.

History and Background

  • 1960s: Early statistical software development (SPSS first released in 1968).
  • 1970s: SPSS Inc. incorporated (1975); SAS Institute founded (1976).
  • 1980s: Stata first released for MS-DOS (1985); SAS rewritten in C (1985), enabling PC versions.
  • 1990s: Stata Corporation formed (1993); SAS 7 introduces the .sas7bdat format (1998).
  • 2000s: Open-source alternatives emerge (R 1.0.0 released in 2000), but proprietary formats persist.
  • 2010s: Stata 13 adds strL long strings (2013); SAS 9.4 adds extended attributes (2013).
  • Present: Open-source libraries such as pandas and haven read all three formats outside their native packages.

Stata:

  • 1985: Stata developed by William Gould at Computing Resource Center, first released for MS-DOS.
  • 1993: Company renamed Stata Corporation (now StataCorp) and relocated to College Station, Texas.
  • 2005: Stata 9 introduces the Mata matrix programming language.
  • 2009: Stata 11 adds factor variables and multiple imputation.
  • 2015: Stata 14 introduces Unicode support and Bayesian analysis.
  • 2017: Stata 15 introduces format 119, enabling datasets with more than 32,767 variables (Stata/MP limit).
  • 2019: Stata 16 adds Python integration.

File Format Specifications

SPSS (.sav format):

  • Proprietary binary format with SPSS-specific record structure
  • File header contains metadata (case count, creation date and time, file label)
  • Data stored in rectangular format as fixed 8-byte elements
  • Variable dictionary includes names, types, labels, and missing value definitions
  • File signature at offset 0: $FL2 (uncompressed or bytecode-compressed files) or $FL3 (ZLIB-compressed files)
  • Optional bytecode or ZLIB compression, indicated by a header flag
  • File extension: .sav
  • Maximum variables: 2,147,483,647 (32,767 before version 10)
  • Maximum cases: 2,147,483,647

SAS (.sas7bdat format):

  • Proprietary binary format introduced in SAS 7
  • File consists of a header (dataset name, timestamps, page size and count) followed by data pages
  • Optional RLE (COMPRESS=CHAR) or RDC (COMPRESS=BINARY) compression
  • Column names, labels, and display formats stored in metadata subheaders
  • File extension: .sas7bdat
  • Maximum observations: Limited by disk space

Stata (.dta format):

  • Binary format with version-specific structure
  • Header contains dataset metadata (variables, observations, labels)
  • Data stored observation by observation (row-major order); format 114 (Stata 10–12) limits fixed strings to 244 bytes
  • Supports value labels and variable characteristics
  • File extension: .dta (format version recorded in the file header)
  • Maximum variables: Version-dependent (up to 120,000 in Stata/MP)
  • Maximum observations: Limited by memory

Data Types and Structures

TypeSPSSSASStataDescription
Numeric8-byte floatFloat, 3-8 bytes (default 8)4-byte float, 8-byte doubleReal numbers with decimal precision
IntegerStored as 8-byte floatStored as floating point1-, 2-, and 4-byte (byte, int, long)Whole numbers
StringFixed width, up to 32,767 bytesFixed width, up to 32,767 bytesstr1-str2045 fixed; strL up to 2 GBText data
DateSeconds since October 14, 1582Days since January 1, 1960Days since January 1, 1960Date values
TimeSecondsSeconds (datetime: seconds since January 1, 1960)Milliseconds since January 1, 1960 (datetime)Time values
Boolean0/1 numeric0/1 numeric0/1 numericTrue/false values (no native type)
MissingSystem and user-defined., ._, and .A-.Z. and .a-.zNull/unknown values

Common Structures:

  • Variables: Columns with names, types, and metadata
  • Observations: Rows representing data records
  • Value Labels: Coded categorical data with text descriptions
  • Variable Labels: Descriptive names for variables
  • Formats: Display formatting for output
  • Weights: Case weighting for analysis

Version Differences

SoftwareVersionYearKey Format ChangesCompatibility
SPSS12.02004Variable names up to 64 bytesLong names stored in extension record; 8-byte short names retained
SPSS16.02007Unicode (UTF-8) modeUnicode files unreadable before version 16
SAS71998New .sas7bdat format; 32-character variable namesReplaces Version 6 data formats
SAS9.42013Extended attributes for data setsData sets with extended attributes unreadable before 9.4
Stata82003New format 113; extended missing values (.a-.z)Not readable by earlier Stata versions
Stata132013New format 117; strL strings up to 2 billion bytesRequires Stata 13 or later
Stata142015New format 118; UTF-8 string encodingRequires Stata 14 or later
Stata152017New format 119; supports datasets with more than 32,767 variablesStata/SE cannot read format 119; use only when variable count exceeds format 118 capacity

Compatibility Notes:

  • Newer SPSS versions read .sav files written by earlier versions
  • SAS .sas7bdat requires SAS 7 or later
  • Older Stata versions cannot read .dta files written in newer formats
  • All formats include version information in headers
  • Third-party tools may have limited version support

Technical References

Questions

What can I convert Statistical Files (SPSS, Stata, SAS) to?

DataMeans converts Statistical Files (SPSS, Stata, SAS) to clean CSV, Excel, JSON & SQL. Each table is exported as its own file, alongside a structured report of exactly what was extracted.

Do I need special software to open my Statistical Files (SPSS, Stata, SAS)?

No. DataMeans reads SPSS (.sav, .zsav), Stata (.dta) and SAS (.sas7bdat, .xpt) files directly, so you don't need SPSS, Stata or SAS. Encrypted files and SPSS portable (.por) files aren't supported.

Can I preview my Statistical Files (SPSS, Stata, SAS) data before paying?

Yes. DataMeans shows your extracted tables and rows in the browser first, so you only pay when you're ready to download the full CSV, Excel, JSON & SQL export.

Is my data secure?

Yes. Your files are encrypted in transit and at rest, and they're deleted automatically: within 7 days if you don't go ahead with a conversion, and when your download window ends if you do. We never sell or share your data, and we never use it to train machine-learning models.