BookmarkSubscribeRSS Feed
Manny3
Obsidian | Level 7

Hi All,

we are working on a requirement to generate an excel file in batch mode  and then set the security information classification for that excel file .

Although first part is quite an easy task but I am not getting any way out to handle the second stuff i.e. to set the security of information classification via SAS code . WIth classification I mean the internal classification available in Microsoft office , like confidential, internal etc.

If any one have an idea about it please share. it will be a great help. 

Regards,
Manny

5 REPLIES 5
FreelanceReinh
Jade | Level 19

Hi @Manny3,

 

How would you set that classification without SAS? I'm not sure, is this one of the document properties (like title, author, subject, etc.)? If so (and possibly even if not), this information can be modified using VBA. Of course, SAS can generate VBA code dynamically (i.e. a text file with .bas extension). And there are ways to execute this VBA code as well: A couple of years ago, I used techniques similar to those described in this SUGI paper (macro run_vba.sas etc.) to let SAS handle Word documents. A quick internet search ("Visual Basic" "Excel" "SAS") suggests that other people have done similar things with Excel.

Manny3
Obsidian | Level 7

Hi @FreelanceReinh,

Thanks for the revert and sorry for that typo error.

I tried few things as suggested, but I feel Microsoft don't allow to modify the information security classification via Macros.
Even I tried to cross check it by recording a macro in excel and updating the security classification, but didn't got anything in macro body .

Please share some ideas on this , if you have done something like this in past.

Regards,

Manny

FreelanceReinh
Jade | Level 19

I see. So, it seems to be even more difficult than I had imagined.

 

What I did in that project back then had nothing to do with security information classification. It was more like page formatting etc.

 

Maybe you can get some information from an Excel forum and then come back for the SAS specific part. I'm sorry I cannot be more helpful.

 

Good luck!

FreelanceReinh
Jade | Level 19

I've just remembered a presentation (on a SAS conference) where someone reported about automating processes involving PowerPoint. They used AutoIt and (I think) managed to operate PowerPoint from SAS via AutoIt.

 

Obviously, whatever can be done using keyboard and mouse can (in principle) be automated with such tools. So, this might be a last resort if everything else fails.

Manny3
Obsidian | Level 7

Thanks @FreelanceReinh,

 

I have not used Autoit  yet, so it will take me some time to dig it .. but have something to  check for. 

Thanks a lot . 🙂

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
  • 5 replies
  • 1138 views
  • 1 like
  • 2 in conversation