The SAS Output Delivery System and reporting techniques

DOCX Support in SAS

Reply
New Contributor
Posts: 4

DOCX Support in SAS

We have a requirement to generate a report in DOCX format using UNIX SAS. I cant think of doing this without using DDE and DDE doesn't work in UNIX. Do you have any suggestions? Any help would be really appreciated.

 

Thanks

Suhas

Grand Advisor
Posts: 16,335

Re: DOCX Support in SAS

RTF file + a VBScript or Unix to save as doc after. 

Esteemed Advisor
Esteemed Advisor
Posts: 6,704

Re: DOCX Support in SAS

Format is not so relevant, most would just export to RTF as @Reeza has given you.  RTF can be read by Word just the same.  

New Contributor
Posts: 4

Re: DOCX Support in SAS

We are currently producing the output in RTF. However, there is a tool that consumes the output and it can only handle DOCX files. Saving manually is not ideal as you would lose the audit trail. VBScript is a good suggestion but as far as I know it doesn't work on UNIX. Any thoughts?

Grand Advisor
Posts: 16,335

Re: DOCX Support in SAS

There's probably a Python or command line utility that can be used on Unix. I've used Python before to do the conversion. 

New Contributor
Posts: 4

Re: DOCX Support in SAS

Interesting, do you have an example Python command or related documentation that I can refer to get more information on converting RTF files to DOCX in Unix?

Grand Advisor
Posts: 16,335

Re: DOCX Support in SAS

No, it was developed as part of a consulting contract.

 

For this type of question, it's not really a SAS issue. I would try posting to StackOverflow, though they require that you have made an attempt to solve the problem. Perhaps searching on there will yield results from someone else.  

 

Good Luck.

New Contributor
Posts: 4

Re: DOCX Support in SAS

Thanks for your time. I was hoping to get some documentation so that I could make an attempt. I will check StackOverFlow as you suggested.

Valued Guide
Posts: 505

Re: DOCX Support in SAS

check out

 

https://listserv.uga.edu/cgi-bin/wa?A2=SAS-L;124ae07.1610a

 

You should be able to do this with the IML interface to R

 

There are many R/Python packages create, update or even convert rtf to DOCX

Post a Question
Discussion Stats
  • 8 replies
  • 594 views
  • 3 likes
  • 4 in conversation