====== Data Conversion ====== Use the Statistical Data Conversion app to convert a data file from one supported format to another. The maximum upload size is 20 MB. The app identifies the input format from the file extension. ===== Supported formats ===== ^ Format ^ Input ^ Output ^ | SPSS | ''.sav'' | ''.sav'' | | SAS data | ''.sas7bdat'' | ''.sas7bdat'' | | SAS transport | ''.xpt'' | ''.xpt'' | | Stata | ''.dta'' | ''.dta'' | | Excel | ''.xls'', ''.xlsx'' | ''.xlsx'' | | Comma-separated values | ''.csv'' | ''.csv'' | | Text data | ''.txt'', ''.dat'' | ''.txt'' | The app exports Excel files as ''.xlsx''; it does not export ''.xls''. Text output is tab-delimited. ===== Convert a file ===== - [[https://webpower.psychstat.org/models/convertdata/|Open the Statistical Data Conversion app]]. - Select a data file in one of the supported input formats. - Choose the format to convert to. - For CSV, TXT, or DAT input, indicate whether the first row contains variable names. - For CSV, TXT, or Excel output, choose how to handle value labels. - Select **Convert**. - When conversion finishes, review the reported row and variable counts and the data structure preview, then select the download link. ===== Options ===== ^ Option ^ Description ^ | Variable names in first row | Choose **Yes** if the first row of CSV, TXT, or DAT input contains column names. Choose **No** if it contains data; the app will assign names such as V1 and V2. | | Value labels | For CSV, TXT, or Excel output, choose **Keep numeric codes** to retain the underlying values, or **Replace codes with labels** to write available value labels as text. This setting does not affect other output formats. | ===== SAS format warning ===== **SAS data files (''.sas7bdat''):** These files are created with ''write_sas()''. The SAS file format is complex and undocumented, so this output is unreliable; in most cases, SAS will not read the file. **For reliable SAS compatibility, choose SAS transport (''.xpt'').** ''write_xpt()'' produces files in the open SAS transport format, which SAS reliably reads. The transport format has limitations. ===== Troubleshooting ===== * Confirm that the file extension matches the file’s actual format. * Check that the file is no larger than 20 MB. * For CSV, TXT, or DAT input, verify the variable-name setting matches the first row of the file. * If SAS cannot read an exported ''.sas7bdat'' file, convert the data to ''.xpt'' instead.