BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jaheuk
Obsidian | Level 7

previous in sas9.2 doing two PROC exports with different SHEET names in the same physical xls did work . . . now in WIN7, sas9.3 the second proc export totally overrides the first one ??!!

H.

1 ACCEPTED SOLUTION
5 REPLIES 5
MaxW
Calcite | Level 5

Try dbms=excel with the file extension xlsx.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Are you sure, I have just exported two datasets to the same file and it worked fine.  Have your removed the replace option?


proc export data=xxx outfile="s:\temp\rob\temp.xls" replace;
  sheet="First";
run;
proc export data=yyy outfile="s:\temp\rob\temp.xls";
  sheet="Second";
run;

Anyways, more reason to come over to the darkside (the tagsets side that is :smileyshocked:)

Jaheuk
Obsidian | Level 7

hi guys,

it always worked (XP, 9.2, office2003) but since we have SAS9.3 and Office 2010 on a WIN7 machine:  we have to use

LIBNAME XLS PCFILES path="\....

I think things are changes with this way of working

H.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

I would perhaps check your setup as I am using 9.3 on Win7 with Excel 2013 and the code works fine for me.  Its the same code I used on 9.2 with Vista and Office 2007.  As far as I am aware there is no change in operation on that. 

Are you using EG or some other SAS product, am assuming you have SAS/ACCESS licensed?  Otherwise I don't see why it wouldn't work.

---

proc export data=sashelp.cars outfile="s:\temp\rob\temp.xls" replace;

  sheet="First";

run;

proc export data=sashelp.gas outfile="s:\temp\rob\temp.xls";

  sheet="Second";

run;

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
  • 1780 views
  • 0 likes
  • 4 in conversation