Importing Data from MS Word to SAS

Reply
New Contributor
Posts: 2

Importing Data from MS Word to SAS

I have a large number of word files, with no specific length/format. The ask is to read each file into a single variable in SAS. So every file will have a corresponding SAS dataset with only one observation and one variable.

Thanks,

Atul

Super User
Posts: 11,343

Re: Importing Data from MS Word to SAS

Posted in reply to atul_a_mishra

Do you actually want all of the font and markup information contained in the file or just the text you would read? Are there any tables in the documents? And which format are the Word documents in, DOC, DOCX, RTF or something else?

New Contributor
Posts: 2

Re: Importing Data from MS Word to SAS

Hi,

I would like to import the visible/printable text. There could be tables in some of them, some might not. Let us assume that the documents are in 'docx'  format.

Thanks,

Atul

Occasional Contributor
Posts: 6

Re: Importing Data from MS Word to SAS

Posted in reply to atul_a_mishra

It seems that SAS does not provide a procedure to import data directly from Microsoft Word into SAS. And I do not know whether there are third party Word processing SDKs that can be used for achieving this effect.  Hope you can find more related information at following links : By the way, the data that you want to import from Word do not include the information contained in image file, right?

  Google Groups

Super User
Posts: 19,770

Re: Importing Data from MS Word to SAS

Posted in reply to atul_a_mishra

Do you have SAS eMiner?

Can you provide more info on your process? Are the text files similar in nature, are you trying to extract all the info or only parts.

I'd probably write a program to use DDE to open each file, copy to an actual .txt file, and then read that in.

Given your limited info, that's my limited answer Smiley Happy

Ask a Question
Discussion stats
  • 4 replies
  • 319 views
  • 0 likes
  • 4 in conversation