The SAS Output Delivery System and reporting techniques

Window Size for Excel from ODS/ExcelXP

Reply
Occasional Contributor
Posts: 6

Window Size for Excel from ODS/ExcelXP

Are there options to specify the size of window that Excel will open when you generate XML code using ODS and the ExcelXP tagset?

Worksheets I generate all seem to open in a small window, requiring a resize to see the reports that have been generated.
SAS Super FREQ
Posts: 8,868

Re: Window Size for Excel from ODS/ExcelXP

Hi:
In my version of TAGSETS.EXCELXP, when I use the doc='Help' suboption, I don't see any window sizing options.
[pre]
ods tagsets.excelxp file='print.xls' style=sasweb
options(doc='Help');
[/pre]

However, when i use Office 2007, I do note this behavior: when I maximize my Excel window and then close Excel while in maximized view, the next time I open a spreadsheet, it opens Excel with the last-used settings -- in maximized view. And, if I resize the Excel window to be really tiny before I close Excel -- then -THAT- is the size (tiny) used the next time I open Excel. If there is an XML setting for display size, I don't see it.

cynthia
Occasional Contributor
Posts: 6

Re: Window Size for Excel from ODS/ExcelXP

I submitted a technical support inquiry, and found that WindowHeight and WindowWidth can be controlled using proc template. Sample code that Chevell sent follows:

define tagset tagsets.test;
parent=tagsets.excelxp;
define event doc;
start:
eval $numberOfWorksheets 0;
put " putq " encoding=" encoding;
put "?>" NL NL;
putl "";
putl
" putl
" xmlns:x=""urn:schemas-microsoft-comSmiley Surprisedffice:excel""";
putl
" xmlns:ss=""urn:schemas-microsoft-comSmiley Surprisedffice:spreadsheet""";
putl " xmlns:html=""http://www.w3.org/TR/REC-html40"">";
putl
"";

do /if operator;
putl "" operator "";
putl "" operator "";
done;

putl "" date "T" time "";
putl "" date "T" time "";
putl "SAS Institute Inc. http://www.sas.com";
putl "" saslongversion "";
putl "
";

/* TO window width and height, modify the tagset below */
putl "" NL;
putl "17000";
putl "20000";
putl "480";
putl "120";
putl "False";
putl "False";
putl "
";

finish:
putl "
";
end;
end;
run; Message was edited by: Marty
SAS Super FREQ
Posts: 8,868

Re: Window Size for Excel from ODS/ExcelXP

Hi:
The forum posting mechanism uses HTML tags. So when you post code that has < or > in the code, the posting that you make frequently gets truncated, Review this previous forum posting
http://support.sas.com/forums/thread.jspa?messageID=27609毙

..for how to hide or mask the < and > tags through the use of the [pre] and [/pre] tags around your code and output in order to maintain indenting and spacing and avoid truncation.

cynthia

PS...If there is a fix for things like this, Tech Support generally knows about it! They are wonderful!
Ask a Question
Discussion stats
  • 3 replies
  • 166 views
  • 0 likes
  • 2 in conversation