BookmarkSubscribeRSS Feed
akarki001
Fluorite | Level 6

I am trying to find the solution to export dataset to a specified range of cell of an existing excel spreadsheet? Please help me if there is any option in proc export or other ods?

5 REPLIES 5
SASKiwi
PROC Star

PROC EXPORT supports this but only if you use DBMS EXCEL or EXCELCS.

akarki001
Fluorite | Level 6
Hi SASKiwi,
Thank you so much. would you mind to explain little bit more how i can i add those in following code please:
PROC EXPORT DATA=DATA
outfile="C:\test.xlsx"
DBMS=xlsx replace label;
sheet=sheet1;
run;
I need to populate my output C6:V10 only output numbers keeping heading fix and rows are fixed. I mean I have 6 by 20 matrix in existing sheet, just want to fix 1st row (heading) and 1st column (Name) fixed. Thank you so much for your help.
akarki001
Fluorite | Level 6
Hi Sajid01,
I have gone through it earlier. Would you mind to elaborate how does it works please. Thank you.
Sajid01
Meteorite | Level 14

The basic requirement is that you should have SAS and Excel installed on the same machine and of course WIndows OS.
Though SAS these days does not recommend it, this is the only direct option you have as I know of. The following SAS reference has good examples. Do read this, if you have not read already done so. (https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostwin/p0rbba3syo5gf1n1gf17jd7zzhwq.htm
This another good reference ( https://www.lexjansen.com/nesug/nesug05/pos/pos15.pdf   ) .

The instructions are pretty clear. 
In case you have an error please post the logs.

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1269 views
  • 1 like
  • 3 in conversation