<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic output to XML not opening in excel in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17220#M3521</link>
    <description>Oh help...&lt;BR /&gt;
I am using SAS 9.1.3 and xlsx (MSoffice 2007).&lt;BR /&gt;
&lt;BR /&gt;
I had a very nice little routine that would place my output into an excel spread sheet.&lt;BR /&gt;
When I tried to replicate for a new project this month, I got an error when I tried to open the XML with excel. &lt;BR /&gt;
&lt;BR /&gt;
The error I get when I go to open my ODS output is: Problem during load - Problem came up in the following areas during load: Workbook setting.&lt;BR /&gt;
This file cannot be opened because of errors. Errors are listed in: C:\Documents and settings\ect..etc... &lt;AND this="" file="" does="" not="" exist="" any="" where="" on="" my="" machine=""&gt;.&lt;BR /&gt;
&lt;BR /&gt;
The ODS output xml that opens in excel is very important to me.&lt;BR /&gt;
Thank you in advance for any help provided,&lt;BR /&gt;
Karen&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
HERE IS MY SAS CODE - tried it with the program that worked before,  tried in my new program, and tried it in a sasuser data set. No mater which data set, the output would not open in excel.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data work.usethis ;&lt;BR /&gt;
	set sasuser.heart;&lt;BR /&gt;
run;&lt;BR /&gt;
	&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ODS Escapechar = '~';&lt;BR /&gt;
options 	nonumber /*supresses automatic page number at top of output*/&lt;BR /&gt;
			orientation=portrait 	/*sets the page orientation to either landscape or portrait - starting 9.2 we may change orientation within a document*/&lt;BR /&gt;
			topmargin = '.5in' bottommargin = '.5in' leftmargin = '.5in' rightmargin = '.5in' &lt;BR /&gt;
			FORMCHAR="|----|+|---+=|-/\&amp;lt;&amp;gt;*"; &lt;BR /&gt;
&lt;BR /&gt;
/*output |before and after| information to RTF for before recoding variables &lt;BR /&gt;
			- this way I can review as a document or in SAS OUTPUT window*/&lt;BR /&gt;
ODS RTF		FILE= 'h:\test Feb24.rtf'&lt;BR /&gt;
	startpage=no keepn contents=yes Style=theme;&lt;BR /&gt;
	ODS noproctitle;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelxp path='H:\' file='test24Feb.xml' &lt;BR /&gt;
	style=XLsansPrinter ;&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelxp options &lt;BR /&gt;
	(contents = 'yes' /*creates a sheet for table of contents*/&lt;BR /&gt;
	sheet_name = 'contents' /*names the content sheet*/&lt;BR /&gt;
	EMBEDDED_FOOTNOTES = 'Feb 24, 2011' /*puts the quoted text - in this case date created - as a footnote*/&lt;BR /&gt;
	SHEET_INTERVAL = 'none' /*this controls where each work sheek is created - default is table*/ &lt;BR /&gt;
	GRIDLINES = 'on'&lt;BR /&gt;
	doc='help');&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc freq data = usethis;&lt;BR /&gt;
tables _all_;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelxp close;&lt;BR /&gt;
ODS _all_ Close;&lt;BR /&gt;
&lt;BR /&gt;
ODS Listing;&lt;/AND&gt;</description>
    <pubDate>Thu, 24 Feb 2011 20:01:56 GMT</pubDate>
    <dc:creator>KarenES</dc:creator>
    <dc:date>2011-02-24T20:01:56Z</dc:date>
    <item>
      <title>output to XML not opening in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17220#M3521</link>
      <description>Oh help...&lt;BR /&gt;
I am using SAS 9.1.3 and xlsx (MSoffice 2007).&lt;BR /&gt;
&lt;BR /&gt;
I had a very nice little routine that would place my output into an excel spread sheet.&lt;BR /&gt;
When I tried to replicate for a new project this month, I got an error when I tried to open the XML with excel. &lt;BR /&gt;
&lt;BR /&gt;
The error I get when I go to open my ODS output is: Problem during load - Problem came up in the following areas during load: Workbook setting.&lt;BR /&gt;
This file cannot be opened because of errors. Errors are listed in: C:\Documents and settings\ect..etc... &lt;AND this="" file="" does="" not="" exist="" any="" where="" on="" my="" machine=""&gt;.&lt;BR /&gt;
&lt;BR /&gt;
The ODS output xml that opens in excel is very important to me.&lt;BR /&gt;
Thank you in advance for any help provided,&lt;BR /&gt;
Karen&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
HERE IS MY SAS CODE - tried it with the program that worked before,  tried in my new program, and tried it in a sasuser data set. No mater which data set, the output would not open in excel.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data work.usethis ;&lt;BR /&gt;
	set sasuser.heart;&lt;BR /&gt;
run;&lt;BR /&gt;
	&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ODS Escapechar = '~';&lt;BR /&gt;
options 	nonumber /*supresses automatic page number at top of output*/&lt;BR /&gt;
			orientation=portrait 	/*sets the page orientation to either landscape or portrait - starting 9.2 we may change orientation within a document*/&lt;BR /&gt;
			topmargin = '.5in' bottommargin = '.5in' leftmargin = '.5in' rightmargin = '.5in' &lt;BR /&gt;
			FORMCHAR="|----|+|---+=|-/\&amp;lt;&amp;gt;*"; &lt;BR /&gt;
&lt;BR /&gt;
/*output |before and after| information to RTF for before recoding variables &lt;BR /&gt;
			- this way I can review as a document or in SAS OUTPUT window*/&lt;BR /&gt;
ODS RTF		FILE= 'h:\test Feb24.rtf'&lt;BR /&gt;
	startpage=no keepn contents=yes Style=theme;&lt;BR /&gt;
	ODS noproctitle;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelxp path='H:\' file='test24Feb.xml' &lt;BR /&gt;
	style=XLsansPrinter ;&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelxp options &lt;BR /&gt;
	(contents = 'yes' /*creates a sheet for table of contents*/&lt;BR /&gt;
	sheet_name = 'contents' /*names the content sheet*/&lt;BR /&gt;
	EMBEDDED_FOOTNOTES = 'Feb 24, 2011' /*puts the quoted text - in this case date created - as a footnote*/&lt;BR /&gt;
	SHEET_INTERVAL = 'none' /*this controls where each work sheek is created - default is table*/ &lt;BR /&gt;
	GRIDLINES = 'on'&lt;BR /&gt;
	doc='help');&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc freq data = usethis;&lt;BR /&gt;
tables _all_;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelxp close;&lt;BR /&gt;
ODS _all_ Close;&lt;BR /&gt;
&lt;BR /&gt;
ODS Listing;&lt;/AND&gt;</description>
      <pubDate>Thu, 24 Feb 2011 20:01:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17220#M3521</guid>
      <dc:creator>KarenES</dc:creator>
      <dc:date>2011-02-24T20:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: output to XML not opening in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17221#M3522</link>
      <description>Hi:&lt;BR /&gt;
  Generally, when I run into that failure to open a workbook, it is for one of these reasons:&lt;BR /&gt;
1) I need to update TAGSETS.EXCELXP&lt;BR /&gt;
2) I have specified some combination of suboptions that generate invalid XML.&lt;BR /&gt;
&lt;BR /&gt;
  So I tried a simplified version of your code (with SASHELP.CLASS) and made a few changes/corrections/simplifications -- but I did not get a Workbook error and the XML file opened correctly in Excel -- I am using Excel 2010, SAS 9.2 and v 1.94 of TAGSETS.EXCELXP -- so you'll have to try the same code and see what you get with your versions of SAS, Excel and TAGSETS.EXCELXP. &lt;BR /&gt;
                  &lt;BR /&gt;
(Or you may have to work with Tech Support, as they can test code on older versions of SAS.)&lt;BR /&gt;
      &lt;BR /&gt;
  In my version of TAGSETS.EXCELXP, PRINT_FOOTER suboption takes a string and EMBEDDED_FOOTNOTES is only a YES/NO suboption. CONTENTS= with SHEET_INTERVAL='NONE' didn't make sense to me -- SHEET_INTERVAL='NONE' tells ODS to make one big table for ALL your PROC FREQ individual tables -- so essentially, the CONTENTS= will probably point to that one big table.&lt;BR /&gt;
&lt;BR /&gt;
  At any rate, with this simplifed code (I took out the ODS RTF step too), I do get output in Excel -- note that the CONTENTS= sheet is already named Contents and the SHEET_NAME='wombat' causes the separate sheets to be named wombat, wombat 2, wombat 3, etc -- so I don't see a name for sheet_name='contents'.&lt;BR /&gt;
 &lt;BR /&gt;
If you go into Print Preview mode, you will see the difference in placement of the SAS footnote and the text string in PRINT_FOOTERS suboption. Once you have working output, then I would go back and change 1 thing at a time -- change the style or change 1 and only 1 suboption, until you hit the combination that breaks. Then, if you think the combination of options should work, you'll have to open a track with Tech Support to see if they can 1) replicate your issue and 2) whether they agree that it's a bug or whether the XML creation is working as designed or 3) whether you are trying some combination of options that results in invalid XML.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data work.usethis ;&lt;BR /&gt;
set sashelp.class;&lt;BR /&gt;
run;&lt;BR /&gt;
            &lt;BR /&gt;
ODS noproctitle;&lt;BR /&gt;
                 &lt;BR /&gt;
ods tagsets.excelxp file='c:\temp\test24Feb.xml' style=sasweb;&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelxp options(embedded_footnotes='yes' sheet_interval='table'&lt;BR /&gt;
                            contents='yes' sheet_name='wombat' doc='Help'&lt;BR /&gt;
                            Print_footer='Print Footer: Feb 24, 2011');&lt;BR /&gt;
                  &lt;BR /&gt;
title;&lt;BR /&gt;
footnote 'My Footnote Statement: Feb 24, 2011';&lt;BR /&gt;
proc freq data = usethis;&lt;BR /&gt;
tables _all_;&lt;BR /&gt;
run;&lt;BR /&gt;
                &lt;BR /&gt;
ODS _all_ Close;&lt;BR /&gt;
                         &lt;BR /&gt;
ODS Listing; &lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 25 Feb 2011 03:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17221#M3522</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-02-25T03:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: output to XML not opening in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17222#M3523</link>
      <description>Thank you Cynthia.&lt;BR /&gt;
It was updating the tagsets...&lt;BR /&gt;
I made changes to my sasuser and updated all templates except that one...&lt;BR /&gt;
&lt;BR /&gt;
That is a good type of error message to remember.&lt;BR /&gt;
&lt;BR /&gt;
Karen S.</description>
      <pubDate>Fri, 25 Feb 2011 17:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17222#M3523</guid>
      <dc:creator>KarenES</dc:creator>
      <dc:date>2011-02-25T17:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: output to XML not opening in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17223#M3524</link>
      <description>I'm having the same problem as Karen. &lt;BR /&gt;
Using Excel XP tagset v1.116, Office 2007&lt;BR /&gt;
&lt;BR /&gt;
 %IF &amp;amp;TYPE_OP=EXCEL %THEN %DO;&lt;BR /&gt;
   %let RV=%sysfunc(appsrv_header(Content-type, application/vnd.ms-excel));&lt;BR /&gt;
   %let RV=%sysfunc(appsrv_header(Content-disposition,%str(attachment; filename=temp.xls)));&lt;BR /&gt;
      ODS _ALL_ CLOSE;                              &lt;BR /&gt;
      ODS TAGSETS.EXCELXP                           &lt;BR /&gt;
      FILE=_webout                                  &lt;BR /&gt;
       OPTIONS(GRIDLINES='YES'                      &lt;BR /&gt;
               AUTOFILTER='NONE'&lt;BR /&gt;
               FROZEN_HEADERS='YES'&lt;BR /&gt;
               SHEET_INTERVAL='NONE'&lt;BR /&gt;
               EMBEDDED_TITLES='YES'&lt;BR /&gt;
             ) style=sasweb;&lt;BR /&gt;
          %REPORT_PRINT;                           &lt;BR /&gt;
         %web_cnt;&lt;BR /&gt;
      ODS TAGSETS.EXCELXP close;               &lt;BR /&gt;
  %END;</description>
      <pubDate>Wed, 09 Mar 2011 21:53:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17223#M3524</guid>
      <dc:creator>Gene_N</dc:creator>
      <dc:date>2011-03-09T21:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: output to XML not opening in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17224#M3525</link>
      <description>Forgot to mention...it is intermittent, works fine 95% of the time.</description>
      <pubDate>Wed, 09 Mar 2011 21:57:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17224#M3525</guid>
      <dc:creator>Gene_N</dc:creator>
      <dc:date>2011-03-09T21:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: output to XML not opening in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17225#M3526</link>
      <description>Hi:&lt;BR /&gt;
  Are you doing this as a stored process or using SAS/IntrNet??? If the issue is intermittent, then I think your best bet for a solution is to work with Tech Support to figure out what is intermittently causing the Dispatcher program or stored process to fail.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 09 Mar 2011 23:17:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/output-to-XML-not-opening-in-excel/m-p/17225#M3526</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-03-09T23:17:53Z</dc:date>
    </item>
  </channel>
</rss>

