05-26-2016 08:56 AM
I have a sample report as below. My purpose is to download the xml or xlsx file in my local PC from the server. I found Chris Hemedinger’s blog post on the internet but I couldn’t find the “Copy Files” task on Enterprise Guide 5.1 and he also showed for “Proc Export” procedure, I’m not sure whether “ods tagsets.ExcelXP” will work or not. I export the xml file as the following path on the server. “sas9/sasdata/....../Example.xml”. I can see the file on Enterprise Guide but I can’t open or copy to my Local PC from the server. I'd like to state that I have to use the “ods tagsets.ExcelXP”.
Chris Hemedinger’s post : http://blogs.sas.com/content/sasdummy/2013/05/20/export-and-download-any-file-from-sas-enterprise-gu...
ods html(id=1) file='server path' style=htmlblue options(page_break='no'); ods msoffice2k(id=2) file='server path' style=htmlblue options(page_break='no'); ods tagsets.excelxp(id=3) file='server path' style=htmlblue options(embedded_titles='no' sheet_interval='none' sheet_name='AllGroups'); ods excel(id=4) file='server path' style=htmlblue options(embedded_titles='no' sheet_interval='none' sheet_name='AllGroups'); proc sort data=sashelp.shoes out=shoes; by region subsidiary product; where product in ('Sandal' 'Boot' 'Slipper') and region in ('Asia', 'Pacific', 'Canada'); run; ** starting program; proc report data=shoes style(summary) = Header; title '1) Without extra columns'; where product in ('Sandal' 'Boot' 'Slipper'); column region subsidiary product,(sales returns calc); define region /group; define subsidiary / group; define product / across; define sales /sum f=dollar12.; define returns / sum f=dollar12.; define calc / computed f=dollar12.; break after region / summarize; compute after region; region = 'Sum'; line ' '; endcomp; compute calc; _c5_ = _c3_ - _c4_; _c8_ = _c6_ - _c7_; _c11_ = _c9_ - _c10_; endcomp; run; ods html(id=1) close; ods msoffice2k(id=2) close; ods tagsets.excelxp(id=3) close; ods excel(id=4) close; title; options byline;
05-26-2016 10:54 AM
05-26-2016 10:54 AM
05-26-2016 02:55 PM
You can also try a file transfer program like WinSCP.
06-01-2016 05:30 PM
Unfortunately, I cannot use WinSCP, MobAxterm,Fillazilla, etc. because I'm working on customer place as an end user. They don't let us.
I tried to do Chris Hemedinger's method in my local and I could succeed, if there are no suggestions, I'm going to try this method on customer environment, and accept Chris response as a solution
06-02-2016 12:44 AM
What about FTP? That command is part of Windows and Unix operating systems so you don't need to install anything. Its not as friendly as @ChrisHemedinger's solution though.
06-02-2016 03:34 PM
To use FTP in SAS code you would need to be able to FTP from your SAS server to your PC. You need to find out the IP address or host name of your PC as the first step.
06-02-2016 04:24 PM
Then, as a next step, you would need to be able to enable/start an FTP server on your local PC. That's an unusual thing to do on most workstations -- and might not be permitted in a tightly controlled IT environment.
Not that I'm rooting for my own answer here (and the Copy Files task), but I know that if you decide to go with that, you'll be in good company. Hundreds of other users now rely on that task -- and probably many more that I haven't heard from...
Need further help from the community? Please ask a new question.