The SAS Output Delivery System and reporting techniques

tagsets.msoffice2k_x and Multiple Sheets

Reply
Contributor
Posts: 52

tagsets.msoffice2k_x and Multiple Sheets

Has anyone been able to get the following example, http://support.sas.com/rnd/base/ods/odsmarkup/msoffice2k/index.html#multiple, to work with either SAS 9.13 or SAS 9.2 (TS2M3) and Excel 2003?

Even after fixing the syntax error, Excel reports back that the spreadsheet has a serious error.

TIA,

Kim LeBouton

PROC Star
Posts: 7,356

tagsets.msoffice2k_x and Multiple Sheets

Kim,

Don't tell Vince, but I've been able to avoid tagsets all of these years.  However, that said, if you post your code and a sample data set, I'd be glad to take a look.

Art

Super Contributor
Posts: 273

tagsets.msoffice2k_x and Multiple Sheets

Kim,

i have tried the sample under 9.2.3  with the minor correction

and  the opening was without problems under excel2010

and after transportation of the file upon a pc whith excel2003

the htm file  (even with a .xls suffix) was opening well

perhaps has the office 2003 the addon for reading  .xlsx files

but in our matter as the code is html, i have no idea why you have had trouble

HTH

Andre

procsort data=sashelp.classout=test;

  by age;

  run;

  ods tagsets.msoffice2k path="d:\temp" file="temp.html" newfile=output;

  proc print data=test;

  by age;

  run;

  ods tagsets.msoffice2k close;

  ods tagsets.msoffice2k_x file="d:\temp\tempmultiple.xls" style=statistical

      options(worksheet_source="11#d:\temp\temp.html,

                                12#d:\temp\temp1.html,

                                13#d:\temp\temp2.html,

                                14#d:\temp\temp3.html,

                                15#d:\temp\temp4.html,

                                 16#d:\temp\temp5.html"

              );

  data _null_;

    file print;

    put "test";

  run;

  ods tagsets.msoffice2k_x close;

the content of tempmultiple.xls   is  the following text

<html xmlns:x="urn:schemas-microsoft-comSmiley Surprisedffice:excel">

<head>

<meta name="Excel Workbook Frameset">

<meta name="Generator" content="SAS Software Version 9.2, see www.sas.com">

<meta http-equiv="Content-type" content="text/html; charset=windows-1252">

<title>SAS Output</title>

<style type="text/css">

<!--

-->

</style>

<script language="javascript" type="text/javascript">

<!--

function startup(){

}

function shutdown(){

}

//-->

</script>

<!--[if gte mso 9]><xml>

<x:ExcelWorkbook>

<x:ExcelWorksheets>

<x:ExcelWorksheet>

<x:Name>11</x:Name>

<x:WorksheetSource HRef="d:\temp\temp.html"/>

</x:ExcelWorksheet>

<x:ExcelWorksheet>

<x:Name>12</x:Name>

<x:WorksheetSource HRef="d:\temp\temp1.html"/>

</x:ExcelWorksheet>

<x:ExcelWorksheet>

<x:Name>13</x:Name>

<x:WorksheetSource HRef="d:\temp\temp2.html"/>

</x:ExcelWorksheet>

<x:ExcelWorksheet>

<x:Name>14</x:Name>

<x:WorksheetSource HRef="d:\temp\temp3.html"/>

</x:ExcelWorksheet>

<x:ExcelWorksheet>

<x:Name>15</x:Name>

<x:WorksheetSource HRef="d:\temp\temp4.html"/>

</x:ExcelWorksheet>

<x:ExcelWorksheet>

<x:Name>16</x:Name>

<x:WorksheetSource HRef="d:\temp\temp5.html"/>

</x:ExcelWorksheet>

</x:ExcelWorksheets>

<x:WindowHeight>12495</x:WindowHeight>

<x:WindowWidth>18900</x:WindowWidth>

<x:WindowTopX>60</x:WindowTopX>

<x:WindowTopY>45</x:WindowTopY>

<xSmiley TonguerotectStructure>False</xSmiley TonguerotectStructure>

<xSmiley TonguerotectWindows>False</xSmiley TonguerotectWindows>

</x:ExcelWorkbook>

</xml><![endif]-->

</head>

<body onload="startup()" onunload="shutdown()" class="Body" style=" text-align: center;">

<script language="javascript" type="text/javascript">

<!--

var _info = navigator.userAgent

var _ie = (_info.indexOf("MSIE") > 0

          && _info.indexOf("Win") > 0

          && _info.indexOf("Windows 3.1") < 0);

//-->

</script>

<div class="branch">

<a name="IDX"></a>

<h1 class="SystemTitle">Le Système SAS</h1>

<div>

<div align="center">

<table cellspacing="0" cellpadding="0" summary="Page Layout">

<tr><td>

<pre class="Batch" style=" padding: 7px; border-spacing: 1px; border: 1px solid #000000; text-align: left;">test                                                                                                    

</pre></td></tr>

</table>

</div>

</div>

<br>

</div>

</body>

</html>

Ask a Question
Discussion stats
  • 2 replies
  • 502 views
  • 0 likes
  • 3 in conversation