BookmarkSubscribeRSS Feed
shalmali
Calcite | Level 5

Hello Everyone,

I have almost 12000 html files. I want to convert these html files into text files. Is there any code to import html files in sas and convert it in to text file?

Thank you for your time.

5 REPLIES 5
Tom
Super User Tom
Super User

You should just search for html to text converters on the web.  Or perhaps html to xml.

If the format is very clean you might be able to read it with a data step.

You might also look into reading them into Excel and then importing into SAS from excel.

art297
Opal | Level 21

Can you provide one as an example?

Ksharp
Super User

The simplest way is using OLEDB .

shalmali
Calcite | Level 5

The html files are 10-k reports from SEC edgar. I want to convert these html files into text files. I also have url of these html files.

Ksharp
Super User

Oh. Maybe you should firstly download all these htmls at your local PC by using PROC HTTP or filename+url .Then using the method I posted convert it into SAS Datasets ,and use proc export to export txt files.

It is easy. I think. Smiley Happy

Ksharp

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 2026 views
  • 0 likes
  • 4 in conversation