BookmarkSubscribeRSS Feed
suhas_sanjee
Calcite | Level 5

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

8 REPLIES 8
Reeza
Super User

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

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.  

suhas_sanjee
Calcite | Level 5

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?

Reeza
Super User

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

suhas_sanjee
Calcite | Level 5

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?

Reeza
Super User

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.

suhas_sanjee
Calcite | Level 5

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.

rogerjdeangelis
Barite | Level 11

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

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!

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.

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
  • 8 replies
  • 2104 views
  • 3 likes
  • 4 in conversation