I am using the following code to export 3 SAS datasets to separate sheets in an Excel file. The exporting works fine, the file is small and has no bells or whistles. The problem is, when I open the Excel file, all 3 tabs are selected. When all tabs are selected, any change made on any cell will alter that cell on all selected tabs, which could be trouble if a user does not notice that all tabs are selected. One can manually open the Excel file, click on any tab but the first one, and then only that (single) tab/sheet will be selected.
Is there a way to tell SAS (or Excel?) not to select all sheets by default after SAS creates them? I have many of these sheets and would like to avoid opening each one, clicking on one of the tabs, then saving it. (I'm sure it can be done on a folder of files in VBA, but I am hoping SAS has some way to change this grouping behavior).
Thanks.
---------------------------
LIBNAME finbook EXCEL 'C:\test.xlsx' VER=2007;
proc sql;
create table finbook.data as
select * from ds.Final_3_named;
create table finbook.variables as
select * from ds.datainfo;
quit;
DATA finbook.class;
SET sashelp.class;
run;
libname finbook clear;
---------------------------