Hi:
I'm glad things are a bit clearer.
Now, I'm going to be something of a curmudgeon. You are NOT, NOT, NOT creating Excel files on the mainframe. You are creating HTML files that Excel knows how to open and render. I know, it seems like a meaningless distinction -- what is the difference between an "excel file" and a "file that excel knows how to open" -- who cares, right?? Why do I hammer on this point. Well, it's precisely for the reason you asked your question.
What -else- can you do with ODS vis-a-vis how the file is opened and treated by Excel. Can you supply the name of an Excel macro? Can you alter or password protect the spreadsheet? Can you show or hide gridlines? For ODS HTML files that you create, the answer is that you CANNOT do anything with ODS that "touches" Excel pulldown menus, like password protecting the spreadsheet or show or hide gridlines. (Although with TAGSETS.EXCELXP, the XML has many more ways to impact print formatting than the ODS HTML ever could... see this paper:
http://www.nesug.org/Proceedings/nesug08/ap/ap06.pdf -- which shows what you can do exclusively with TAGSETS.EXCELXP that is NOT possible with ODS HTML.)
I'm going to repeat this from my previous posting
....just because you give your file a .XLS file extension this does not make the file (created by ODS) a "true binary Excel file". After you create your file with ODS HTML and FTP the file to your windows machine, open the file with Notepad....you will see HTML tags. Then open the file with Excel -- you will see the HTML table rendered in spreadsheet form....but using the colors and fonts from the style template (if you use ODS MSOFFICE2K, instead of ODS HTML).
The only way to create "true binary Excel files" with SAS is to use PROC EXPORT or the SAS LIBNAME engine. The downside of using either of these techniques are that 1) you need a SAS dataset to use with either of these methods and 2) there are no colors or fonts or formatting with either of these methods.
So the short answer to your question -- you CANNOT easily specify an Excel macro to use with ODS HTML files. Because they are HTML -- they are not binary Excel files. (And, even if you used PROC EXPORT or the LIBNAME engine, I don't believe there's a way to provide an Excel macro that should be used with the binary spreadsheet.)
If you used the MSOFFICE2K destination and -IF- you changed the tagset template used to generate the MSOFFICE2K HTML you MIGHT be able to specify an Excel macro to load when the HTML file was opened. But for a new ODS user -- you would be taking on a huge task -- to understand how to alter the MSOFFICE2K HTML markup generated by ODS to invoke the Excel macro. For example, take a look at this paper
http://www2.sas.com/proceedings/sugi28/012-28.pdf (You reallly have to understand EVERYTHING in this paper -- before you get to page 8, where there's an example of specifying the Excel macro to load when the HTML page renders.)
I am curious why you chose ODS HTML to create your output instead of the ODS MSOFFICE2K destination (which is Microsoft HTML) or ODS TAGSETS.EXCELXP (which is Microsoft Spreadsheet Markup Language XML) -- either of those last destinations was DESIGNED to work better with Microsoft Office than ODS HTML. For one thing, files created with ODS HTML do not have their style formatting respected by Excel; whereas files created with ODS MSOFFICE2K or ODS TAGSETS.EXCELXP -DO- have their style formatting (supplied by ODS) respected by Excel. In my mind, a far easier thing to do would be to use ODS to format your output instead of using an Excel macro....depending on what you are doing with your formatting. There are many papers that show the use of STYLE= option changes to impact your output when it is rendered by the destination -- any destination -- not just Excel. But that's another topic.
At any rate -- enough for now....and more for you to think and read about.
cynthia