<?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 Re: How to convert xml files to xlsx in SAS EG 7.15 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759466#M240013</link>
    <description>&lt;P&gt;No, I am asking after I have created this file as xml, how do automatically convert these files to xlsx. Since this process outputs about 250 files opening and saving as xlsx would be a lot of work for a monthly report. So I am trying to find a way to work around it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The virtual desktop that I use for work does have Excel installed.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Aug 2021 19:37:50 GMT</pubDate>
    <dc:creator>Iske</dc:creator>
    <dc:date>2021-08-04T19:37:50Z</dc:date>
    <item>
      <title>How to convert xml files to xlsx in SAS EG 7.15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759393#M239986</link>
      <description>&lt;P&gt;I am trying to convert xml files to xlsx files in SAS EG v7.15 that is hosted on an AWS server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way the files are currently created is by using the following code below and a macro to name the files according to a list of agency names and numbers.&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp&lt;BR /&gt;path = '/data//Test'&lt;BR /&gt;file="agency_report_&amp;amp;name._&amp;amp;agency..xml"&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp close;&lt;BR /&gt;ods listing close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen previous post about users using the following code to convert all the files from xml to xlsx&lt;/P&gt;&lt;P&gt;options noxsync noxwait;&lt;BR /&gt;%convert_files(default=/data/Test,ext=xml);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I do this I get the following three error statements&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 13-12: Unrecognized SAS option name NOXSYNC.&lt;/P&gt;&lt;P&gt;ERROR 13-12: Unrecognized SAS option name NOXWAIT.&lt;/P&gt;&lt;P&gt;ERROR: Shell escape is not valid in this SAS session.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The macro %convert_files is run before I call it. Does anyone know why this is not working or if there is another way for me to convert these xml files to xlsx?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 16:51:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759393#M239986</guid>
      <dc:creator>Iske</dc:creator>
      <dc:date>2021-08-04T16:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert xml files to xlsx in SAS EG 7.15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759399#M239989</link>
      <description>&lt;P&gt;Why? The setting of your session have disabled the X command and related options most likely.&lt;/P&gt;
&lt;P&gt;This is typically set by admins of a SAS server install such as EG to prevent headaches caused by uncontrolled submission of operating system commands.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have the right license options I would be tempted to try:&lt;/P&gt;
&lt;PRE&gt;ods excel
path = '/data//Test'
file="agency_report_&amp;amp;name._&amp;amp;agency..xlsx"
/*  I really hope you have code that goes here*/
ods excel close;
&lt;/PRE&gt;
&lt;P&gt;If you must have the XML and the XLSX you can have multiple ODS output destinations open at one time. Just make sure to close them appropriately.&lt;/P&gt;
&lt;P&gt;I typically used a "balanced sandwich" approach to consistently open and close multiple destinations like:&lt;/P&gt;
&lt;PRE&gt;Ods tagsets.excelxp &amp;lt;tagset options&amp;gt;;

Ods rtf  &amp;lt; rtf options&amp;gt;;

&amp;lt;output generating code goes here&amp;gt;

ods rtf close;

ods tagsets.excelxp close; 
&lt;/PRE&gt;
&lt;P&gt;The order of the close bits shouldn't make a difference but I like to make sure first opened is last closed just to find the statements when needed.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 17:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759399#M239989</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-04T17:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert xml files to xlsx in SAS EG 7.15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759407#M239994</link>
      <description>&lt;P&gt;Are you asking how to convert an XML files generated by TAGSETS.EXCELXP to an XSLX file?&lt;BR /&gt;The best way is to open the XML file with Excel itself and then save it as an XLSX file.&lt;/P&gt;
&lt;P&gt;You didn't provide any code for the macro you are calling but from the error messages you are getting I suspect it is trying to do that.&amp;nbsp; Since you are using Enterprise Guide to run your SAS code (instead of just running the SAS code directly using SAS itself)&amp;nbsp; make sure the computer where SAS is running actually has Excel installed.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 17:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759407#M239994</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-04T17:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert xml files to xlsx in SAS EG 7.15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759431#M240000</link>
      <description>&lt;P&gt;Why not just go straight to Excel (xlsx)?&amp;nbsp; Don't use the essentially obsolete ExcelXP tag set.&amp;nbsp; Use the ODS Excel destination.&amp;nbsp; What version of SAS are you running?&amp;nbsp; Unless it's a fairly old version, you should be able to use the Excel destination.&amp;nbsp; If you use the Excel destination, then you don't need to convert XML to XLSX; you'll have XLSX directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This paper might be helpful:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 18:26:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759431#M240000</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-08-04T18:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert xml files to xlsx in SAS EG 7.15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759466#M240013</link>
      <description>&lt;P&gt;No, I am asking after I have created this file as xml, how do automatically convert these files to xlsx. Since this process outputs about 250 files opening and saving as xlsx would be a lot of work for a monthly report. So I am trying to find a way to work around it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The virtual desktop that I use for work does have Excel installed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 19:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759466#M240013</guid>
      <dc:creator>Iske</dc:creator>
      <dc:date>2021-08-04T19:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert xml files to xlsx in SAS EG 7.15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759503#M240026</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37107"&gt;@jimbarbour&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Why not just go straight to Excel (xlsx)?&amp;nbsp; Don't use the essentially obsolete ExcelXP tag set.&amp;nbsp; Use the ODS Excel destination.&amp;nbsp; What version of SAS are you running?&amp;nbsp; Unless it's a fairly old version, you should be able to use the Excel destination.&amp;nbsp; If you use the Excel destination, then you don't need to convert XML to XLSX; you'll have XLSX directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This paper might be helpful:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You might consider my suggestion of just going directly to XLSX and eliminating the XML step.&amp;nbsp; Going directly to XLSX can be fully automated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 20:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-xml-files-to-xlsx-in-SAS-EG-7-15/m-p/759503#M240026</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-08-04T20:30:02Z</dc:date>
    </item>
  </channel>
</rss>

