Read-only desktop viewer for SAS, SPSS and Stata data files. Open a dataset, inspect values and metadata, query with DuckDB SQL, export CSV / Parquet / Excel. Nothing is written back to the statistical file.
| Source | Formats |
|---|---|
| SAS | .sas7bdat, .xpt (v5/v8), .sas7bcat (catalog only, not a dataset) |
| SPSS | .sav, .zsav, .por |
| Stata | .dta (v104–v119) |
System dependencies:
- Rust 1.88+ (
rustup;rust-toolchain.tomlpins 1.88.0) - Node.js 20+
- LLVM / Clang (
bindgenneedslibclang) - macOS: Xcode Command Line Tools (system
iconv) - Linux:
clang,llvm-dev,libclang-dev, WebKitGTK 4.1 (for Tauri), and glibciconv. If linking fails on musl/Alpine, installlibiconvand setREADSTAT_LINK_ICONV=1. - Windows: LLVM (Chocolatey:
choco install llvm), plus Visual Studio Build Tools.iconvis vendored (win-iconv). zlib is compiled vialibz-sys.
npm install
npm run tauri devFrontend only (no native commands):
npm run devRust crates:
cargo test -p readstat
cargo check --workspace# current architecture
npm run tauri build
# macOS universal (requires both targets)
rustup target add aarch64-apple-darwin x86_64-apple-darwin
npm run tauri build -- --target universal-apple-darwin
# Windows x64 (run on Windows; unsigned)
npm run tauri buildLinux packages are not a release target yet.
GitHub Actions builds installers on a v* tag (or the Release workflow):
- Windows: NSIS
.exe - macOS:
.dmgfor Apple Silicon and Intel
git tag v0.1.0
git push origin v0.1.0Encoding is not guessed. Older Chinese SAS/SPSS files are often GBK or GB18030; pre-14 Stata may be Windows-1252.
If strings or labels are garbled, or the file has no reliable extension:
- Open the dataset.
- Re-import…
- Pick encoding (
GBK,GB18030,Latin1,Windows-1252,UTF-8) and/or format. - For SAS value labels, attach a
.sas7bcat(same-stem /formats.sas7bcatis auto-detected when present).
ReadStat C (vendored) → readstat-sys (bindgen) → readstat (Arrow batches) → DuckDB session file → Tauri commands (JSON pages) → Vue 3 grid.
Locked crate pair: duckdb 1.10505.0 (DuckDB 1.5.5) + arrow 58.
Data tables store raw values. Labels live in meta_variables / meta_value_labels. Dates are formatted in Rust using SAS (1960-01-01), Stata and SPSS epochs.
Put samples in tests/fixtures/:
sample.sav/sample.dta/sample.sas7bdat/sample.xptxpt_v5.xpt,xpt_v8.xpt,dta_v113.dta,dta_v118.dta
Tests skip missing files. Official ReadStat / pyreadstat samples are preferred.
ReadStat C is vendored from WizardMac/ReadStat v1.1.9 (MIT). Windows builds also vendor win-iconv (public domain).