BookmarkSubscribeRSS Feed
patrikc
Calcite | Level 5

When using this software, I am unable to import the data into it. I have checked the data source and its attributes, and there doesn’t seem to be any issue. What should I do?螢幕擷取畫面 (245).png

1 REPLY 1
ballardw
Super User

First, is the XLS file where the EG server can see the file? I can't tell from the image is the XLS is local to your machine or on the server.

 

Also, XLS and XLSX files require additional licenses for Access to PC Files to Import to work.

You can see if you have the license by running:

Proc Setinit;
run;

Your log would show your license information including something that looks similar to:

---Base SAS Software
                             30JAN2060
---SAS/STAT
                             30JAN2060
---SAS/GRAPH
                             30JAN2060
---SAS/Secure 168-bit
                             30JAN2060
---SAS/Secure Windows
                             30JAN2060
---SAS Enterprise Guide
                             30JAN2060
---SAS/ACCESS Interface to PC Files
                             30MAY2062
---SAS/ACCESS Interface to ODBC
                             30MAY2062

If your log does not include the PC Files then you aren't licensed. If it does show the PC Files then run this code to see if it was installed:

Proc Product_status;
run;

Which would show something similar to:

For Base SAS Software ...
   Custom version information: 9.4_M4
   Image version information: 9.04.01M4P110916
For SAS/STAT ...
   Custom version information: 14.2
For SAS/GRAPH ...
   Custom version information: 9.4_M4
For High Performance Suite ...
   Custom version information: 2.2_M5
For SAS/ACCESS Interface to PC Files ...
   Custom version information: 9.4_M4
For SAS/ACCESS Interface to ODBC ...
   Custom version information: 9.4_M4

If the PC Files does not appear in this output but does for the Proc Setinit then your need to re-install SAS, or have the admin that manages the SAS session you connect to with Enterprise Guide, to re-install SAS with PC Files.

 

 

 

Without the PC Files install you can use your spreadsheet software to save the file a CSV format file and import that newly saved CSV file. SAS will create a data step program that you can save to document the properties or to make changes for when the IMPORT procedure makes the wrong guess for the variable type such as creating numeric variables for things like Account numbers which loses information like leading zeroes.

 

There is an advantage to saving XLS or XLSX files to CSV if you have multiple files of the same structure that the same program can be used just change the input file name and the output data set. Otherwise multiple Imports may result in different variable types and lengths of variables that cause other problems later when combining similar data sets.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 591 views
  • 0 likes
  • 2 in conversation