BookmarkSubscribeRSS Feed
ja_lew
Fluorite | Level 6

I have 2 excel workbooks each consisting of 1 sheet. and a 3rd workbook created with excelxp tagset that is roughly 20 tabs and 160+ pages (when exported to pdf)

as always the process is as automated as possible at this point and i'm looking to finish it to 100% automated.  the issue is these 2 single sheet workbooks.  they are created manually by another team in excel and at a high level are nothing more than a list of acronyms and a distribution template.

is there a way from within SAS to populate the workbook created by my excelxp tagset procedure with these 2 sheets?

basically as it stands today

1. run tagset report

2. open tagset report

3. open definition report

4. copy sheet1 from definitions to tagset report

5. open media report

6. copy sheet 1 from media to tagset report

what im hoping to get to:

1. run tagset report - code merges in definitions and media tab

2. profit.

ive looked @ dde and having a template workbook with a VB macro that the code would run to open/copy automatically with something like this (this is my current path i'm looking into):

data _null_;

  file sas2xl;

  put "[open(""&xlsTemplatePath."", 0 , true)]";

  put "[run(""Macro1"")]";

  put '[file.close(false)]';

  put '[quit()]';

run;

2 REPLIES 2
data_null__
Jade | Level 19

You can absolutely do that using SAS to create WSH programs to do "Office Automation".  You could even use DDE but I don't like it as much as writing a WSH program and calling it with SAS.

However, before you got too involved in that is itpossible/conceivable to import the two sheets in question into SAS and then recreate them in the new workbook(XML) created by tagsets.excelxp.  (If that makes sense?)

ja_lew
Fluorite | Level 6

it IS possible to pull the 2 sheets into sas and recreate (this was where i started) however with how dynamic the 2 sheets are it would be less efficient (as well as non-automated) with having to re-code new tweaks each week.

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