- Home
- Documentation
- Exporting data
- File formats, Stata and SPSS
Exporting data
File formats, Stata and SPSS
What is in the WIDE file, the Stata do-file and .dta, SPSS .sav, Excel, time zones, multiple-choice columns, long texts, and how the formats were checked.
Joripo documentation · https://joripo.com/docs/exporting/formats
The WIDE file
- One row per submission, in the order the server received them, oldest first.
KEYidentifies each submission;SubmissionDatecomes first andinstanceID,formdef_versionandKEYlast, as in the SurveyCTO-compatible layout. - A multiple-choice question gives the answer as recorded, plus one 0/1 column per choice.
- A GPS answer is split into latitude, longitude, altitude and accuracy columns.
- Photos, recordings, signatures and audits are links: a link opens the file for a signed-in member of your organisation and for nobody else.
- The versions of a form are merged into one file: a question added in a later version is blank for earlier submissions.
Dates and times are written in one time zone, SubmissionDate included: your computer's when you use Export files, the zone the submissions were collected in for a quick download.
Stata
The import do-file is SurveyCTO's own template, filled in for the form, and names the CSV it was exported with. It finds that CSV next to itself, in the folder Stata runs from, or in your Downloads folder (including a browser's name (1).csv), checks the number of columns, applies variable and value labels, converts dates, and saves a .dta.
After the template's own labels, the do-file also labels what those leave bare: calculations and metadata, questions without a label in the chosen language, each 0/1 choice column as "question: choice", and repeat counts. There is no need to run odksplit afterwards.
Joripo also writes a .dta directly, with variable and value labels and dates as dates.
Long texts. A text answer longer than 2,045 bytes is cut short when Stata imports the CSV with the do-file (a limit of Stata's CSV import); the .dta Joripo writes keeps the whole value, as a long string.
SPSS
The .sav file carries variable labels, value labels and dates as dates, with SurveyCTO's nonresponse codes marked as user-missing.
Excel
The .xlsx file holds the same columns as the CSV, typed by column, so numbers are numbers.
How the formats were checked
- Against SurveyCTO. Real SurveyCTO submissions of seven forms were replayed through Joripo and the files compared with SurveyCTO's own exports. The WIDE headers were identical for five of the seven forms (the other two differ only where the data is from an older form version), and four were identical cell for cell; the remaining differences come from inputs that were not available, not from the exporter.
- In Stata and SPSS. For fifteen real forms, Stata MP 17 ran every do-file from another folder with no error, each
.dtahad the CSV's columns with no cell different from the CSV, and SPSS 25 opened every.sav.
A damaged submission
A submission whose stored file is damaged cannot be read into an export. It is left out, never quietly: the Data Exporter says how many were left out and gives their KEYs, the README.txt in each zip lists them, and a single file says so as it is saved. The server keeps the file as it arrived; ask your server's maintainer to look at it.