BookmarkSubscribeRSS Feed
cjmfpf
Calcite | Level 5

I am trying to figure out how to write in a new tab in an existing excel spreadsheet. I have a spreadsheet set up that takes the SAS output and transforms it into a nice-looking table over the course of a couple of tabs. I ideally would like to have SAS output a tab into that document.

proc export data=data.txmsi 
			dbms=excel
			outfile="C:\\SAS Testing Add Tab\testexceldoc.xls" 
			REPLACE;
	sheet="Data";
run;

 

 

I found some code (above) for a proc export step, but my company apparently doesn't have any SAS/ACCESS products so I can't seem to find a dbms option that works and also allows me to have a sheet. Is there any way to get around this using the proc export step, or is there some different way to output a tab into an existing excel spreadsheet? I am using SAS version 9.4.

 

Thank you!

Carla

1 REPLY 1
Reeza
Super User

http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export

 

or DDE but that's a security risk. Infinitely easier with SAS/ACCESS to PCFILES.

 


@cjmfpf wrote:

I am trying to figure out how to write in a new tab in an existing excel spreadsheet. I have a spreadsheet set up that takes the SAS output and transforms it into a nice-looking table over the course of a couple of tabs. I ideally would like to have SAS output a tab into that document.

proc export data=data.txmsi 
			dbms=excel
			outfile="C:\\SAS Testing Add Tab\testexceldoc.xls" 
			REPLACE;
	sheet="Data";
run;

 

 

I found some code (above) for a proc export step, but my company apparently doesn't have any SAS/ACCESS products so I can't seem to find a dbms option that works and also allows me to have a sheet. Is there any way to get around this using the proc export step, or is there some different way to output a tab into an existing excel spreadsheet? I am using SAS version 9.4.

 

Thank you!

Carla


 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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