The SAS Output Delivery System and reporting techniques

Export SAS Query Result to a Fixed Location in Existing Spreadsheet

Reply
Occasional Contributor
Posts: 6

Export SAS Query Result to a Fixed Location in Existing Spreadsheet

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.  

SAS Super FREQ
Posts: 9,434

Re: Export SAS Query Result to a Fixed Location in Existing Spreadsheet

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
Occasional Contributor
Posts: 6

Re: Export SAS Query Result to a Fixed Location in Existing Spreadsheet

Posted in reply to Cynthia_sas

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!

 

Ask a Question
Discussion stats
  • 2 replies
  • 202 views
  • 0 likes
  • 2 in conversation