The SAS Output Delivery System and reporting techniques

output to excel

Reply
Regular Contributor
Posts: 189

output to excel

Hi,

I inherited code which had to be changed since the sampling method was changed (a DOMAIN statement was added).  Prior to the code change, the output to Excel worked. However, though the analysis portion now works and outputs to MS Word but not the output to the MS Excel spreadsheet.

Can you help troubleshoot?

Thanks!

Attachment
Respected Advisor
Posts: 3,068

Re: output to excel

The code to write to Excel is commented out with /* and */. Try removing these.

Grand Advisor
Posts: 10,251

Re: output to excel

If looks like this may have been using DDE from the line:

filename excel&c dde

You might want to investigate exporting using a different method. In my organization we have identified at least one program, Cisco Jabber, that if it has a process running in the system, interferes with DDE. Other programs may well have the same issue.

Also codes of the file type needed, which I don't see in your code, seem to change with each release of Microsoft office.

I would seriously investigate if possibly tagsets.excelxp or possibly a data _null_ step with put statements to a CSV file might work.

N/A
Posts: 1

Re: output to excel

Hi SAS Users,

I also need some assistance here with proc export, its giving a successful result but  I cant find the file in the destination folder

proc export
          data=work.ggP
          dbms=csv
          outfile="C:\Users\dngugi\Documents\Reporting\Important\Training\ggP.xls"
           replace
                 run;

Log details
1440 records created in C:\Users\dngugi\Documents\Reporting\Important\Training\ggP.xls from WORK.GGP.

Esteemed Advisor
Esteemed Advisor
Posts: 7,253

Re: output to excel

Hi,

Please start a new topic as this isn't related to the OP.  This is the area the file is stored: C:\Users\dngugi\Documents\Reporting\Important\Training

If you are running SAS on a server, then that location will not be C: on your local machine, but on the server's C:.  Perhaps check with your it helpdesk.

Esteemed Advisor
Esteemed Advisor
Posts: 7,253

Re: output to excel

I agree with ballardw, this code can do with a complete re-write.  This is what happens when programming is done without following SDLC.  It doesn't get reviewed, or documented ending up with code which has been around for ages.  Start by addressing what you have, and what you want, document this and then the programming is generally simple from that.

Ask a Question
Discussion stats
  • 5 replies
  • 565 views
  • 0 likes
  • 5 in conversation