Import and export formats
StatLab opens CSV, TSV, Excel (.xlsx, .xls, .ods) and SPSS .sav files, and saves data as CSV or Excel, output as HTML, PDF or Word/Excel-ready tables, and whole projects as .statlab.json files.
Which files can I open?
| Format | Notes |
|---|---|
| CSV / TSV / TXT | A Text Import dialog lets you choose the delimiter (detected automatically), the decimal symbol (comma for 1.234,5), the encoding (UTF-8 or Windows-1252 detected), whether the first line holds names, and lines to skip — with a preview. Columns where every value is a number become numeric. |
| Excel .xlsx / .xls / .ods | Choose the worksheet and, optionally, a cell range such as A1:F200; untick “names in the first row” if the sheet has none. |
| Stata .dta | Stata 8 and later (releases 113–119), including long strings (strL), variable labels and value labels. File → Export data as Stata .dta writes release 118; text longer than 2,045 bytes is stored as a long string (strL). |
| SAS .sas7bdat | Read-only: 32- and 64-bit files, both byte orders, uncompressed or compressed (CHAR/RLE and BINARY/RDC), variable labels and the file's encoding. SAS dates and date-times arrive as text (YYYY-MM-DD, YYYY-MM-DD hh:mm:ss); SAS time formats stay as seconds. Checked against the pandas reader on 28 sample files. |
| JSON | An array of records, {columns, data}, or an object of column arrays. |
| Paste | File → Paste data from Excel: paste copied cells; tab-separated, first row = names. |
| SPSS .sav | Reads variable labels, value labels, user-missing values (including ranges), measure level, long variable names, very long strings and the file’s text encoding. Uncompressed, standard-compressed and zlib-compressed (.zsav) files, and SPSS portable files (.por). Not yet: dates as dates (they arrive as numbers), weights (ignored, with a warning). |
How do I export?
- Data: File → Export data as CSV, or as Excel (.xlsx) with a second sheet listing every variable’s label, values and missing codes. SPSS .sav (with labels, value labels and missing values) and Stata .dta are also available.
- One table: press Copy next to its title, then paste into Word or Excel — it arrives as a real table.
- Charts: PNG (for documents) or SVG (vector).
- All output: Output → Word (.docx with real tables and chart images), Excel (.xlsx, one sheet per block), Export HTML, or Print / PDF.
- Project: File → Download project saves data, variable definitions, the syntax log and all output in one .statlab.json file you can open on any device.