• Data Viewer User's Guide
    • Introduction to Data Viewer
    • How to ...
      • Open CSPro Data Files
      • Navigating Data Viewer's Windows
      • Filtering Cases and Display Options
      • Converting CSPro Data Files to Other Formats
      • Export Data
      • Downloading and Synchronizing Data
      • Run Production Synchronizations
      • Get Help
    • Appendix

Export Data

In addition to exporting data via the Tools > Export Data utility, Data Viewer has another way to export data to other file formats. It can be found under the menu dropdown: File > Export.
This export feature allows data to be written natively to the formats supported by the Export Data tool, with a couple exceptions:
  • Excel: supported in Data Viewer but not in Export Data.
  • JSON: supported in Data Viewer but not in Export Data.
  • CSPro Data Files: not supported (use File > Save As instead).
The table below shows how the output file formats from the Export Data tool compare to Data Viewer's Export Data feature, when the "Output one file..." checkbox is unchecked:
Output File TypeExport Data Tool
Filenames
Data Viewer Export
Filenames
Notes
CSVfilename.csvfilename.csvWritten natively, one file per dictionary record. Handles quote marks properly.
 
Excel(n/a)filename.xlsxWritten natively to a single workbook, one worksheet per dictionary record.
 
JSON(n/a)filename.jsonWritten natively to a single file as an array of case objects.
 
Rfilename.dat
filename.R
filename.RDataWritten natively to a single file, one vector per dictionary record.
 
SASfilename.dat
filename.sas
filename.xpt
filename.xpt.sas
Written natively to the two files shown.
 
SPSSfilename.dat
filename.sps
filename.savWritten natively, one file per dictionary record.
 
Statafilename.dat
filename.dct
filename.do
filename.dtaWritten natively, one file per dictionary record.
Example 1
Let's look at Excel first. Once the Export Data dialog is launched, choose Excel. By default, a single Excel workbook will be created with the same filename as the data but using the .xlsx extension, as shown below. The resultant Excel file will contain one worksheet for each dictionary record found in the data file.
The only deviation from the default settings was the addition of myFolder. The data file being exported is located in the C:\HFA\data folder, and is named 064C01_200.csdb. The resultant 064C01_200.xlsx file will be placed within the subfolder "myFolder." If this folder does not exist, CSPro will create it.
Example 2
Let's revisit the Excel example. Note the "Output" checkbox selection made below. This tells the export feature to write each dictionary record found to a separate Excel workbook (rather than creating a single workbook where each record gets placed on a separate worksheet). The "Output" checkbox only impacts the file types Excel, JSON, R, and SAS.
Summary of Export File Types
The table below summarizes the specific files that will be generated for the possible export types. By default, the output filename will use the data filename as the base name (although this can be changed). Most exported file types will also append the dictionary record name to the base filename, as most of the export files represent dictionary records (this part of the name cannot be changed).
Export FormatExport FilenameOutput Box
Checked?
Dictionary Record-to-Export File RelationshipNotes on "Output" Checkbox
CSVrecord_name.csvNo1 .csv file for each record
CSVrecord_name.csvYes1 .csv file for each recordNo effect, same files output as when 'No' chosen
 
Excelfilename.xlsxNo1 .xlsx file for the entire data fileEach record is a separate worksheet
Excelrecord_name.xlsxYes1 .xlsx file for each record
 
JSONfilename.jsonNo1 .json file for the entire data fileEach record is a separate array of objects
JSONrecord_name.jsonYes1 .json file for each record
 
Rfilename.RDataNo1 .RData file for the entire data fileEach record is a separate vector
Rrecord_name.RDataYes1 .RData file for each record
 
SASfilename.xpt
filename.xpt.sas
No1 .xpt/.sas file pair for the entire data file
SASrecord_name.xpt
record_name.xpt.sas
Yes1 .xpt/.sas file pair for each record
 
SPSSrecord_name.savNo1 .sav file for each record
SPSSrecord_name.savYes1 .sav file for each recordNo effect, same files output as when 'No' chosen
 
Statarecord_name.dtaNo1 .dta file for each record
Statarecord_name.dtaYes1 .dta file for each recordNo effect, same files output as when 'No' chosen
See also: Introduction to Export Data, Converting CSPro Data Files to Other Formats