Desktop productivity for business analysts and programmers

sas eg excel to pdf

Reply
Occasional Contributor
Posts: 9

sas eg excel to pdf

hi all

i use filezilla to put a excel onto the server

in my program i bring in the file as follows

x cp /users_ac/amardeep.singh/Daily_Results_Template.xlsx %sysfunc(pathname(work))/Daily_Results_Template.xlsx;

then import some data into that excel tab

is there a way to then convert that into a pdf or its not possible in sas eg

 

Esteemed Advisor
Posts: 6,646

Re: sas eg excel to pdf

ODS has a pdf destination that lets you print all SAS output to a pdf file.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Grand Advisor
Posts: 17,327

Re: sas eg excel to pdf

Not within EG, but with the X command enabled you can automate it using a VB script or VBA.

Excel can 'print' to a PDF directly and if you automate that step with a VB script or a macro embedded into the worksheet.

 

Or as mentioned, 

export your results directly to a PDF file. 

Occasional Contributor
Posts: 9

Re: sas eg excel to pdf

thanks

do you have an example as to how to call a vb script using x command

so i create a excel file that has macro in it and within sas call that macro

if i can get an example or sample code as to how to call vbscript or macro

it would be really appreciated

Esteemed Advisor
Posts: 6,646

Re: sas eg excel to pdf

With LibreOffice, one can do it from the commandline:

path_to_libreoffice/soffice --convert-to pdf [--outdir target_directory] File(s)

But that's software from people who have a clue.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 4 replies
  • 119 views
  • 0 likes
  • 3 in conversation