Hi,
After spending the better part of the morning searching the Web without success I thought I would ask for help.
Can anyone point me to a simple procedure to import data from a web page?
Thanks
Fred
Hi, and here is a most recent posting on using the FILENAME engine to read a URL:
https://communities.sas.com/message/197467#197467
If you search the community, you should find others. I know there have been user group papers written about it. Look at some of the hits that I found in the attached screen shot.
cynthia
Hi Cynthia,
I can't get past ERROR: The connection has timed out..
Any suggestions?
Fred
Fred,
That message indicates an issue between SAS and the html data.
Can you cut-n-paste the html address from the filename into a browser ON THE SAME machine as the SAS server and get to the target? Sometimes a remote server can have different internet connectivity than a workstation.
Doc Muhlbaier
Duke
Hi,
What would be required if the web page required you to enter username and password?
Fred
With the filename url access method, you can specify user= and pass=.
Alternatively you could try to use wget to download to a local file and read that.
Fred,
Does the table show on one screen or is it a large table? Regardless, if you still run into problems getting the data into SAS, you may want to take a look at: Copy and Paste Almost Anything - sasCommunity
The paper doesn't provide any of the help you've already been given regarding how to read the file directly, but may offer some needed advice for turning the html table into a SAS file.
Hi everyone and thanks for your comments.
What I ended up doing was linking an Excel file to the URL that contains the data.
SAS opens the excek file that then refreshes, Sas then imports the refreshed data.
Data validations are then performed.
Fred
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.