The SAS Output Delivery System and reporting techniques

Tagsets to create multiple worksheets per Excel workbook

Reply
N/A
Posts: 0

Tagsets to create multiple worksheets per Excel workbook

I found the wonderful example from the SAS support site demonstrating how to generate multiple worksheets per Excel workbook without any file location warnings--this one, to be exact: http://support.sas.com/rnd/base/topics/templateFAQ/excelexamples.html#nowarn

I've modified it to fit with my dataset, locations, output, etc., and it still gives me the "Some of the files in this Web page are not in the expected location" warning.

One interesting point: when I modified my filepaths to make the Excel file (allstudents.xls) generate in the root C:\ directory and the xml/html files to generate in the C:\allstudents_files directory, I had no problems and the program ran as intended. My issues started when I used an extended filepath to where I normally store my SAS programs and such, in a subdirectory on C.

Why would a subdirectory cause problems, if I still have the _files subdirectory within the subdirectory?
SAS Employee
Posts: 95

Re: Tagsets to create multiple worksheets per Excel workbook

Did you change the filepaths in the doc_head event in the tagset?

There are three places that will need your new filepath.

If you are using sas 9.1 I would also recommend that you take a look at
the ExcelXP tagset. With few exceptions this is the best way to create
workbooks at the current time.

The most current tagset and examples are available here.

http://support.sas.com/rnd/base/topics/odsmarkup

There are a few papers and more examples under papers and presentations.

http://support.sas.com/rndbase/topics/odsmarkup/pandp.html

Eric
SAS Employee
Posts: 88

Re: Tagsets to create multiple worksheets per Excel workbook

Do you also have this path specified in the tag within the event doc_head? Also if you have SAS 9.1 and Excel 2002 or greater, the ExcelXP tagset would be a better option because it allows you to generate multiple worksheets per workbook which is not file based.

define event doc_head;
start:
put "" NL;
put ' ';
put '' NL;
N/A
Posts: 0

Re: Tagsets to create multiple worksheets per Excel workbook

I could have sworn I changed all the paths earlier, but I left the program, went to lunch, returned, changed all the paths again, and now the program works. Go figure!

Yes, I have 9.1.3 and Excel 2002. I have to play around with the options somewhat, but I see how ExcelXP provides a lot of freedom without the filebased tables.

Thanks for the tips!
N/A
Posts: 0

Re: Tagsets to create multiple worksheets per Excel workbook

Just a note of caution of writng files to the root directory of a drive. I accidently wrote 25,000 files to c:\ once - and that poor machine was never quite the same. I deleted the files immediately I realized the error, but the damage was already done....
Ask a Question
Discussion stats
  • 4 replies
  • 194 views
  • 0 likes
  • 3 in conversation