Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.12 KB

README.md

File metadata and controls

37 lines (25 loc) · 1.12 KB

Maven Central

SPSS Reader

Java library to read SPSS files.

Adding to your project

<dependency>
  <groupId>com.bedatadriven.spss</groupId>
  <artifactId>spss-reader</artifactId>
  <version>1.3</version>
</dependency>

Reading an SPSS File

SpssDataFileReader reader = new SpssDataFileReader("mydata.sav");

// Print variables present in the file
for(SpssVariable variable : reader.getVariables()) {
    System.out.println(variable.getLabel());
}

// Read the cases
while(reader.readNextCase()) {
    double var0 = reader.getDoubleValue(0);
    String var1 = reader.getStringValue(1);
}

Changelog

1.3 - 2020-02-04