BookmarkSubscribeRSS Feed
jcis7
Pyrite | Level 9

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!

5 REPLIES 5
SASKiwi
PROC Star

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

ballardw
Super User

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.

David_K
Calcite | Level 5

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 5 replies
  • 1165 views
  • 0 likes
  • 5 in conversation