BookmarkSubscribeRSS Feed
ANU_s
Calcite | Level 5

I am trying to export data into an existing excel sheet, so that the values are pasted as special values. There is an existing pivot table designed based on the information on the current sheet.

Is there any method to do the above?

I have created a pivot table in new sheet in 'shoes.xls' excel file and saved in C drive. Then i made a copy of the shoes file and made changes in the data and saved it as 'shoesnew.xlsx'

I have tried this:

proc import datafile="C:\shoesnew.xlsx"

dbms=xlsx

out=shoesnew

replace;

getnames=yes;

run;

data shoesnew;

set shoesnew;

run;

ods tagsets.ExcelXP path='H:\' file='shoes.xls' style=printer;

ods tagsets.ExcelXP options(sheet_name='shoes');

proc print data=shoesnew noobs; run; quit;

ods tagsets.excelxp close;

************My data in the shoes.xls is getting erased if i am using above statements*********************

Can anyone please suggest if it possible to paste values as special in an existing excel sheet??

1 REPLY 1
Reeza
Super User

I'm a touch confused, what are you trying to do overall.

Are you trying to get data into Excel from SAS  (PROC EXPORT)

or into SAS from Excel (PROC IMPORT)?

 

There is a method to copy data to the clip board, but it isn't quite that simple. Would that be what you're looking for?

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 954 views
  • 0 likes
  • 2 in conversation