BookmarkSubscribeRSS Feed
Mike_B
Obsidian | Level 7

I've read through several in-the-weeds papers as well as the 9.4 ODS Excel documentation and can't find anything on this, so I'm guessing it's not currently offered, but I figured I'd ask. I'm trying to get SAS to populate the Company Field in an Excel file's metadata. I'm using Base SAS 9.4M6 and can populate most of the editable 'properties'--e.g. category, comments, keywords--except Subject, Company and Hyperlink Base. Any help is appreciated.

2 REPLIES 2
Mike_B
Obsidian | Level 7

It showed me how to extract these values from an XLSX file (below), which could be handy, but not how to output to those fields without vbscript. Looks like this simply isn't a SAS feature right now. But thanks for the help.

 

filename xl zip "&path\&fname..xlsx" member='docProps/core.xml';

filename tempxml temp;

data _null_;
infile xl;
file tempxml;
input;
put _infile_;
run;

filename tempmap temp;
libname  tempxml xmlv2 automap=replace xmlmap=tempmap;

data _null_;
set tempxml.coreProperties;
put _all_;
run;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 600 views
  • 1 like
  • 2 in conversation