07-16-2015 10:21 AM
I'm very new to SAS so I'm going to assume this is an easy fix that I just can't figure out! I have created an excel file with multiple worksheets. My problem is my first worksheet is labeled "Page 1" for example, Second, "Page 2", and third is "Page 3". What's happening is they are getting labeled "Page 2", "Page 2 2", and "Page 3". The other thing that is happening is my freeze pane for my columns is looking at what I want for Page 2 and not for Page 1. The data on Page 1 is correct, it's just the tab label and the freeze pane. A snippet of my code is as follows;
ods listing close;
ods tagsets.ExcelXP path = 'location of my file'
file = 'NameOfFile.xls' style=MINIMAL;
ods tagsets.ExcelXP options(sheet_name='Page 1'
PROC REPORT DATA=WORK.TblPage1
..... Code to create my first worksheet ....
ods tagsets.ExcelXP options(sheet_name='Page 2'
PROC PRINT DATA=WORK.TblPage2 noobs
ods tagsets.ExcelXP options(sheet_name='Page 3'
PROC PRINT DATA=WORK.TblPage3 noobs
ods tagsets.ExcelXP close;
07-16-2015 10:33 AM
I can't see from that what would be the issue. The following code runs correctly on my 9.3:
ods _all_ close;
ods tagsets.excelxp file="s:\temp\rob\temp.xml" options(sheet_name="Page 1" frozen_headers="1" frozen_rowheaders="2");
proc report data=sashelp.cars nowd;
ods tagsets.excelxp options(sheet_name="Page 2" frozen_rowheaders="8");
proc print data=sashelp.cars noobs;
ods _all_ close;
Are you sure there is nothing else your doing, maybe setting sheet_interval option or something in your code?
07-16-2015 11:00 AM
No, my proc report is doing some cumputes to alternate the row colors (white/gray), Then I do another set of computes to color any cell that has a negative number, that's it.