1
votes

How would you import an online xls file in SAS ?

I tried

proc import
    out=test
    datafile='//statbel.fgov.be/fr/binaries/311111Population%20de%20droit%201990-2011_fr_tcm326-55771.xls'
    dbms=excel
    replace;
run;quit;

ERROR: DBMS type EXCEL not valid for import.

I also tried DBMS=xls and DBMS=XLSX

SAS 9.3 in SAS enterprise guide 5.1

Operating System: WX64_SV .
---Base SAS Software
---SAS/STAT
---SAS/GRAPH
---SAS/ETS
---SAS/CONNECT
---SAS/IntrNet
---SAS Integration Technologies
---SAS/ACCESS Interface to ODBC
---SAS Workspace Server for Local Access
---SAS Workspace Server for Enterprise Access
---DataFlux Trans DB Driver
---SAS Framework Data Server
---SAS Add-in for Microsoft Excel
---SAS Add-in for Microsoft Outlook
---SAS Add-in for Microsoft PowerPoint
---SAS Add-in for Microsoft Word

2

2 Answers

1
votes

You don't license SAS/ACCESS to PC FILES, so you can't use PROC IMPORT with DBMS=EXCEL. You will need to import it using point-and-click in Enterprise Guide, license the software, or download it and save it as CSV or similar format (or obtain it in a different format).

1
votes

The answer is given by Chris@SAS in this forum:
https://communities.sas.com/message/194367#194367

1 use SAS to copy the file from the web to a path on your SAS Workspace
2 use SAS Enterprise Guide and the Import Data task to create the SAS data set.