| Crates.io | xpttools |
| lib.rs | xpttools |
| version | 0.2.2 |
| created_at | 2025-11-10 23:02:20.885282+00 |
| updated_at | 2025-11-10 23:07:11.614398+00 |
| description | XPT read library in rust and cli tool to converst to CSV |
| homepage | |
| repository | https://github.com/avidys/xpt.rs |
| max_upload_size | |
| id | 1926349 |
| size | 210,737 |
Rust library and CLI tool to read XPT v5 - SAS Transport files
Library: Use as a Rust crate in your projects
CLI Tool: Command-line utilities for inspection and conversion
xptcols — Print dataset metadata (variables, types, lengths, positions)xpthead — Display the first n rows of a datasetxpt2csv — Convert an XPT dataset to CSV./target/release/xpttools xptcols DM.xpt
./target/release/xpttools xpthead DM.xpt
./target/release/xpttools xpthead DM.xpt -n 20
./target/release/xpttools xpt2csv PC.xpt -o PC.csv
./target/release/xpttools xpt2csv SDTM.xpt -d PC -o PC.csv
./target/release/xpttools xpthead SDTM.xpt -d PC
./target/release/xpttools xpthead SDTM.xpt -d PC -n 5
📖 See USAGE.md for detailed library documentation and examples.
Quick start:
use xpttools::read_xpt_v5;
let datasets = read_xpt_v5("data.xpt")?;
let dataset = &datasets[0];
println!("Dataset: {} ({} variables, {} rows)",
dataset.name, dataset.vars.len(), dataset.rows.len());
For Tauri/web contexts, use read_xpt_v5_from_bytes():
use xpttools::read_xpt_v5_from_bytes;
let data = std::fs::read("data.xpt")?;
let datasets = read_xpt_v5_from_bytes(&data)?;