0% found this document useful (0 votes)
23 views4 pages

Exporting Data

Uploaded by

asresmen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views4 pages

Exporting Data

Uploaded by

asresmen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

NCSS Statistical Software NCSS.

com

Chapter 116

Exporting Data
Introduction
NCSS can export both text and numeric data to a wide variety of spreadsheets, databases, and statistical systems.
You can either export the entire dataset or export a subset of the data by entering a list of rows and/or columns to
export.
The table below presents a list of the types of files that can be exported by NCSS.

List of Exported Files


File Name File Type File Extension
Access Database ACCDB, MDB
dBase Database DBF
Epi Info Database REC
Excel Spreadsheet XLS, XLSX
Gauss Stat System DAT
HTML Text File HTML, HTM
JMP Stat System JMP
LimDep Stat System CPJ
Lotus 123 Spreadsheet WK3
Matlab Stat System MAT
Minitab Stat System MTW
NCSS 97-2007 Spreadsheet Stat System S0
NCSS 97-2007 Database Stat System S0Z
Paradox Database DB
Quattro Pro Spreadsheet WKQ
SAS Stat System SD2, SAS7BDAT, XPT
SPLUS Stat System DAT
SPSS Stat System SAV, POR
Stata Stat System DTA
Statistica Stat System STA
Symphony Spreadsheet WR1, WRK
Systat Stat System SYS
Text (Delimited) Text File TXT, CSV
Text (Fixed-Width) Text File TXT

Export Limitations
The only limitation in exporting files is that some file types can only receive a limited number of rows and
columns. You should check with the export file type before performing the export operation to make sure the data
you are exporting is compatible with the resulting file type.

116-1
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exporting Data

Text or Numeric Field Type


The database (and some spreadsheet) formats require that each field (column) has a designated type such as
numeric or text. Since NCSS data can be text, numeric, or both, some assumptions have to be made during the
export. NCSS checks the first row of data for each column that is exported. If the value in the first row is numeric,
then the field is designated numeric. If the first value is text, the field is designated text. Once a field has been
designated as numeric, any non-numeric values are changed to missing values during the export. Once a field has
been designated as text, any numeric values are changed to text values.

How to Export Data to a File


For most export file types, the only step necessary to perform the export is to select the type and name of the file
to export. For the rest, the Export Wizard guides you through the steps of exporting a file. Follow the on-screen
instructions to complete the export. The file types that require additional information are NCSS 97-2007 Database
files (*.S0z), Access files (*.ACCDB or *.MDB), and Text Files (*.TXT or *.CSV).

Selecting a File to Export


To perform an export, you must select the type of file to export. To do this, select File > Export (or File > Export
Subset) from the Data Window menu and then select the type of file to export. The most-commonly exported files
are displayed in the call-out menu. If the file type you want to export is not on this list, select Other File Format.
Either way, this will bring up a dialog prompting you to name the file to which the data will be exported (If you
are exporting a subset, you will first be presented with a dialog wherein you must select which rows and/or
columns you want to export). You may provide a new name or select a file that already exists on your computer.
If you select a file that already exists, it will be overwritten by the export procedure, so be careful. You can
change the export file type by clicking on the dropdown box at the bottom of the dialog window near the File
Name box. When you click the dropdown box, a complete list of exportable file types will be displayed. When
you have named the export file, click Save. This will perform the export operation directly if no additional steps
are necessary or start the Export Wizard if needed. You cannot change the export file after the wizard has started;
to change the export file you must cancel the wizard and start again.

The Export Wizard


If you are exporting a file type that requires additional information beyond the file type and name, the Export
Wizard will ask you to provide it before the export operation is performed. The file types that require additional
information are NCSS 97-2007 Database files (*.S0z), Access files (*.ACCDB or *.MDB), and Text Files (*.TXT
or *.CSV).
This section will describe the additional information that is required by these file types.

Additional Options for Exporting NCSS 97-2007 Database Files (*.S0z)


The following additional options are required to export NCSS 97-2007 Database files with extension *.S0z.
Usually you can leave all of these options at their default values.
Number of Empty “Add-On” Columns
Since you cannot add columns to an NCSS 97-2007 database after it is created, this option allows you to specify
how many columns to add to the end of the NCSS 97-2007 database beyond the number of columns in your
dataset that have data and will be exported.
Text Field Length
This is the length of a data-cell’s field. This must be at least ten. You can make this larger for longer text values.
A text value requires four additional bytes of storage.

116-2
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exporting Data

Number of Extra Text Fields


Additional space is added to the end of each record for this many extra-long (greater than six characters) text
columns.
Extra Text Field Length
The length of the extra text fields that are stored at the end of each record.

Additional Options for Exporting Access Files (*.ACCDB or *.MDB)


The following additional options are required to export Access database files with extension *.ACCDB or *.MDB.
Minimum Text Field Width
This is the minimum width for a text field in the Access database. You should increase this number when
exporting large text values.
New Table Base Name
This value is used to create the name of the new table in the Access database.

Additional Options for Exporting Delimited Text Files (*.TXT or *.CSV)


A fixed-width text file is one in which each value occurs at the same position on a row. The data may appear as a
solid string of numbers. A format statement is needed to tell the program how to list the data on a row of the file.
Besides the format statement, you must also designate what indicator should be used for missing values and what
the total row length of the file should be.
Delimiter
You specify the character that is to be used to separate values in the file. If you choose “Other”, then you must
specify a delimiter in the box provided.
Export Column Names
Check this option to store column names in the first row of the text file.
Replace Missing Values With
This box specifies the character(s) to be inserted for missing values.
Enclose Text Between
Text may be enclosed between double or single quotation marks so that text variables with imbedded spaces, such
as street addresses, can be processed correctly by other programs. This option specifies how text data should be
treated.
Number of Characters per Line
This box specifies the number of characters per line. If “Automatic” is selected, each line will be long enough to
hold its data, but no longer.

Additional Options for Exporting Fixed-Width Text Files (*.TXT)


A fixed-width text file is one in which each value occurs at the same position on a row. The data may appear as a
solid string of numbers. A format statement is needed to tell the program how to list the data on a row of the file.
Besides the format statement, you must also designate what indicator should be used for missing values and what
the total row length of the file should be.

116-3
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exporting Data

Format Statement
This box contains the format statement that specifies how the data will be positioned in the output file.
The syntax is based on three single-letter commands and the slash character. These items are combined to form
the format statement. These commands will be discussed next, followed by examples of format statements.

L is for a Left-Justified Variable


The character L is used to designate a left-justified column. The actual syntax is rLn.d, where r indicates the
number of times the format segment is repeated, n represents the number of positions (characters) used, and d
represents the number of decimal places. If r is omitted, it is assumed to be one. Note the n must include space for
the decimal point (which is one character) and a minus sign (if necessary).

R is for a Right-Justified Variable


The character R is used to designate a right-justified variable. The actual syntax is rRn.d, where r indicates the
number of times the format segment is repeated, n represents the number of positions (characters) used, and d
represents the number of decimal places. If r is omitted, it is assumed to be one. Note the n must include space for
the decimal point (which is one character) and a minus sign (if necessary).

X is for Skip
The character X is used to designate the skipping of certain character positions on the row. The actual syntax is
Xn. The n represents the number of positions (characters) that are left blank.

/ is for Next Row


The character / is used to transfer to the beginning of the next row.

Examples of Fixed Format Statements


The format commands above, except for the slash, are combined using commas. The slash serves as its own
separator and does not need to be combined with a comma. Note that the values are assigned to the dataset
columns in sequence. Following are some examples of how these format commands can be placed together to
form the format statement.
Column Values Format Statement Resulting Row
12, 45, 32 3L6.1 12.0 45.0 32.0
12, 45, 32 3L6.0 12 45 32
12.23, 45.56, 32.14 2R8.1,X10,R8.3 12.2 45.6 32.140

Export Column Names


Check this option to store column names in the first row of the text file.
Replace Missing Values With
This box specifies the character(s) to be inserted for missing values.
Number of Characters per Line
This box specifies the number of characters per line. If “Automatic” is selected, each line will be long enough to
hold its data, but no longer.

How to Export a Subset of the Data to a File


The basic export operation exports all rows and columns. To export a data subset, you must select File > Export
Subset. You can then choose which columns and rows to export. You can either enter a list or range of rows to
export (e.g. “1-10, 15, 20-25” or “1-20”) or, if you have an active filter, you can choose to export only those rows
that pass the filter. You can also select a subset of columns to export using the column selection tool. All of the
remaining steps will be the same as a normal export.

116-4
© NCSS, LLC. All Rights Reserved.

You might also like