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

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1185 views
  • 1 like
  • 3 in conversation