BookmarkSubscribeRSS Feed
EHittner
Fluorite | Level 6

I'd like to export a SAS query result to an existing Excel spreadsheet on a specific sheet tab.  I have a pre-formatted template in my spreadsheet on Sheet1, that is linked to a range of cells on Sheet2.  Sheet2 is where I want my data to be inserted.  Is there a way to do that without creating a new spreadsheet document each time?  Seems like it would be simple -- but I've spoken too soon before.  

2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
If your range of cells on Sheet2 is a named range, I believe you might be able to use the LIBNAME engine to write to that range of cells. However, what I don't remember is whether you can overwrite what might be in those cells with something else.

That's probably a question for Tech Support. Partly, I think the answer will depend on what version of SAS you have and how you plan to do the export and what SAS/Access products you have (such as SAS/Access to PC Files) and whether you need the PC File Server.

Cynthia
EHittner
Fluorite | Level 6

Hi Cynthia.  Apologies for the delay in response.  Ultimately I'd like to just develop and format the entire report in SAS and just export it to the location I need it in.  This is more of a bridge process to that point.  I will, however, give your suggestion a shot -- and let you know how it goes.  Much appreciated!

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 824 views
  • 0 likes
  • 2 in conversation