BookmarkSubscribeRSS Feed
Oleg_L
Obsidian | Level 7

Hello SAS-users.

How can i read .htm files into SAS dataset?

Is it possible?

Now I save .htm files as Excel and use proc import.

Is it the only way?

I use SAS 9.2

Thanks in advance.

Oleg.

10 REPLIES 10
Ksharp
Super User

Is it what you are looking for?

http://communities.sas.com/message/103590#103590

Ksharp

Oleg_L
Obsidian | Level 7

Thanks for your reply Ksharp.

But i can not open your link.

Oleg.

jonam
Calcite | Level 5

Sometime back i read an interesting article of my friend Pramod @

http://pramod-r.blogspot.com/2011/02/reading-table-from-website-into-sas.html

which describes in detail

Reading a table from a website into a SAS dataset

Hope this helps.

Oleg_L
Obsidian | Level 7

Thank you Jonam.

I will investigate your documentation.

Oleg.

SASJedi
SAS Super FREQ

Oleg, I've written a workshop for SAS Users Groups called "Untangling the World Wide Web"   You can download a ZIP file containing the PDF and sample SAS code at http://goo.gl/oinmj

Check out my Jedi SAS Tricks for SAS Users
Cekola
SAS Employee

Hi @SASJedi, is that sample SAS code still aailable somewhere for download?

I'm looking for a way to import multiple html files and parse them using SAS, so maybe it would be helpful.

 

Thanks!

SASJedi
SAS Super FREQ
Get "Untangling the World Wide Web" from my master links page
http://marksworld.net/jedi

Check out my Jedi SAS Tricks for SAS Users
Cekola
SAS Employee
Thank you so much!!!
art297
Opal | Level 21

HTML files can extend across numerous types, layouts, etc.  Did you have anything specific in mind?  Like trying to import a table from a page that you find on the web?

MikeZdeb
Rhodochrosite | Level 12

Hi ... Rick Langston has a couple of papers that might help with reading HTML files

and creating SAS data sets ...

Creating SAS® Data Sets from HTML Table Definitions

http://support.sas.com/resources/papers/proceedings09/052-2009.pdf

and ...

Handling Large Stream Files with the @'string' Feature

http://www2.sas.com/proceedings/forum2007/027-2007.pdf

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 14000 views
  • 1 like
  • 7 in conversation