In general, you can
import files that use blanks and special characters in the filenames
and column names. The following list identifies how table names are
handled:
-
For text files (such as CSV files),
the table name is initially set from the filename.
-
When you import a spreadsheet,
the table names are handled as follows:
-
If the spreadsheet contains a single
worksheet, the table name is initially set from the filename.
-
If the spreadsheet contains multiple
worksheets, each table name is initially set as a combination of the
filename, an underscore, and the name of the worksheet.
-
After the initial table name is
determined, an unsupported special character is replaced with an underscore.
These special characters include / \ * ? " < > | : - and
the period (.).
-
Table names are shortened to 32
characters because that is the table name length that is supported
by SAS.
For column names, most
special characters can be used, including spaces. An unsupported special
character is replaced with an underscore. These special characters
include / \ * ? " < > | : - and the period (.).
By default, column names
are read from the first row of the text file. If you clear the
Includes
column names check box, the column names are generated
for you as follows:
-
Spreadsheets Column names are assigned A, B,
C, and so on.
-
Text files Column names are assigned VAR1,
VAR2, and so on.
The following table
identifies how column names that begin with a number, such as 2013sales
,
or use numbers only, such as 2013
,
interact with the Includes column names check
box:
|
|
|
_2013sales for
XLSX, XLS, and text files.
|
|
_2013 for
XLSX and text files.
For Excel 97-2003 Workbook
(XLS) files, a letter such as A , B , C ,
and so on, is substituted for the column name, depending on the column
position in the file.
|