<?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: Unable to open xls file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989549#M380215</link>
    <description>Thanks Tom.. I will open a case with SAS tech support</description>
    <pubDate>Thu, 11 Jun 2026 09:59:35 GMT</pubDate>
    <dc:creator>srinivasa_attot</dc:creator>
    <dc:date>2026-06-11T09:59:35Z</dc:date>
    <item>
      <title>Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989213#M380173</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We are unable to open an .xls file generated by a SAS program on a local desktop. However, the same program works correctly when generating an .xlsx file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error message:&amp;nbsp;“We found a problem with some content in &amp;lt;filename.xls&amp;gt;.”&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This issue started occurring after upgrading to SAS 9.4 M8. The same functionality was working fine in SAS 9.4 M7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp;There are no special characters in the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Statement:&amp;nbsp;&lt;BR /&gt;proc export data=sample outfile=/home/raju/filename.xls" dbms=xls&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Srinivas&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2026 06:57:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989213#M380173</guid>
      <dc:creator>srinivasa_attot</dc:creator>
      <dc:date>2026-06-04T06:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989222#M380174</link>
      <description>&lt;P&gt;Are you running into this?&lt;BR /&gt;&lt;BR /&gt;Problem Note&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;40383:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/I&gt;An unreadable content error occurs when you open Microsoft Excel files that were created by a 64-bit Excel driver&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/40/383.html" target="_blank"&gt;https://support.sas.com/kb/40/383.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Koen&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2026 09:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989222#M380174</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2026-06-04T09:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989249#M380175</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/473750"&gt;@srinivasa_attot&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Statement:&amp;nbsp;&lt;BR /&gt;proc export data=sample outfile=/home/raju/filename.xls" dbms=xls&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is this a typographical error? You need a double quote after outfile= to match the double-quote at the end of the file name.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2026 11:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989249#M380175</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2026-06-04T11:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989250#M380176</link>
      <description>&lt;P&gt;It's a typo error.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2026 11:21:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989250#M380176</guid>
      <dc:creator>srinivasa_attot</dc:creator>
      <dc:date>2026-06-04T11:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989251#M380177</link>
      <description>I tried the article, but it did not help.</description>
      <pubDate>Thu, 04 Jun 2026 11:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989251#M380177</guid>
      <dc:creator>srinivasa_attot</dc:creator>
      <dc:date>2026-06-04T11:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989296#M380188</link>
      <description>Did you try EXCEL engine ?&lt;BR /&gt;&lt;BR /&gt;proc export data=sample outfile=/home/raju/filename.xls" dbms=excel&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;or XLSX engine :&lt;BR /&gt;proc export data=sample outfile=/home/raju/filename.xls" dbms=xlsx&lt;BR /&gt;replace;&lt;BR /&gt;run;</description>
      <pubDate>Fri, 05 Jun 2026 07:57:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989296#M380188</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-06-05T07:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989298#M380190</link>
      <description>DBMS=EXCEL gave an error as " DBMS TYPE EXCEL IS NOT VALID PROMPT"</description>
      <pubDate>Fri, 05 Jun 2026 09:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989298#M380190</guid>
      <dc:creator>srinivasa_attot</dc:creator>
      <dc:date>2026-06-05T09:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989303#M380191</link>
      <description>&lt;P&gt;What exactly is generating that error message? Because it sounds like something that would be generated by a program that was trying to READ the file.&amp;nbsp; Please share you SAS log so we can see the exact error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also do you really need to create the ancient XLS format?&amp;nbsp; Try switching to the XLSX format and see if that works better for you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export data=sample
  dbms=xlsx
  outfile="/home/raju/filename.xlsx" replace
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jun 2026 14:56:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989303#M380191</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-06-05T14:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989333#M380192</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We are unable to open an .xls file generated by a SAS program on a local desktop. However, the same program works correctly when generating an .xlsx file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error message: “We found a problem with some content in &amp;lt;filename.xls&amp;gt;.”&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This issue started occurring after upgrading to SAS 9.4 M8. The same functionality was working fine in SAS 9.4 M7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: There are no special characters in the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Statement:&lt;BR /&gt;proc export data=sample outfile=/home/raju/filename.xls" dbms=xls&lt;A href="https://king365tv-eu.com/" target="_self"&gt;site&lt;/A&gt;&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Srinivas&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I've run into similar issues before where the problem wasn't actually SAS but the Excel file itself. In a couple of cases the file had an .xls extension even though it wasn't a valid Excel workbook anymore. Opening the file directly in Excel and then saving it as a fresh workbook solved the issue. It might be worth checking whether the file opens normally outside of SAS before spending too much time troubleshooting the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2026 22:23:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989333#M380192</guid>
      <dc:creator>BillyVelasq</dc:creator>
      <dc:date>2026-06-05T22:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989337#M380193</link>
      <description>&lt;P&gt;Usually the problem with reading an Excel file created by SAS is caused by SAS not actually putting any information into the file.&amp;nbsp; Make sure that the step that actually writes to the XLS file has written at least one observation with at least one variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also XLS files have smaller limits on number of rows (observations) and columns (variables) than modern XLSX files allow.&amp;nbsp; Perhaps your data exceeds one or both of those limits.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2026 14:23:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989337#M380193</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-06-06T14:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989398#M380202</link>
      <description>There is no issue with code. The same program is working for xlsx. I am trying to export a dummy data for testing the xls. It contains 3 columns and 10 rows without any special characters.</description>
      <pubDate>Tue, 09 Jun 2026 06:29:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989398#M380202</guid>
      <dc:creator>srinivasa_attot</dc:creator>
      <dc:date>2026-06-09T06:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989399#M380203</link>
      <description>Let me try this option and get back to you.</description>
      <pubDate>Tue, 09 Jun 2026 06:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989399#M380203</guid>
      <dc:creator>srinivasa_attot</dc:creator>
      <dc:date>2026-06-09T06:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989400#M380204</link>
      <description>There are no errors in the log. It shows successfully executed, the issue is occurring when opening the file in desktop. XLSX format is working fine. There are multiple programs with xls which were working fine in M7 but not working in M8. Changing all these programs to XLSX is tedious task.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Jun 2026 06:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989400#M380204</guid>
      <dc:creator>srinivasa_attot</dc:creator>
      <dc:date>2026-06-09T06:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989416#M380205</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/473750"&gt;@srinivasa_attot&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;There are no errors in the log. It shows successfully executed, the issue is occurring when opening the file in desktop. XLSX format is working fine. There are multiple programs with xls which were working fine in M7 but not working in M8. Changing all these programs to XLSX is tedious task.&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;"Opening file in desktop" with what software?&amp;nbsp; How did you get the file from the SAS server to the desktop?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you making a NEW file, or trying to modify an existing one?&amp;nbsp; If an existing one then perhaps there is something strange with the file already before SAS tried to write to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the same problem occur when making a brand new XLS file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you recreate the issue on SAS On Demand?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2026 12:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989416#M380205</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-06-09T12:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989497#M380208</link>
      <description>&lt;P&gt;I have no trouble making an XLS file on SAS On Demand and then downloading the file to my personal computer and opening it with the Numbers application on MacOS.&lt;/P&gt;
&lt;PRE&gt; 73         %put &amp;amp;=sysvlong;
 SYSVLONG=9.04.01M8P022223
 74         filename xls '~/example.xls';
 75         proc export data=sashelp.class dbms=xls file=xls replace;
 76         run;
 
 NOTE: The export data set has 19 observations and 5 variables.
 NOTE: "XLS" file was successfully created.
 NOTE: PROCEDURE EXPORT used (Total process time):
       real time           0.30 seconds
       cpu time            0.06 seconds&lt;/PRE&gt;
&lt;P&gt;And it does not matter if the file already exists. The existing file is overwritten with a new good XLS file.&lt;/P&gt;
&lt;PRE&gt; 73         %put &amp;amp;=sysvlong;
 SYSVLONG=9.04.01M8P022223
 74         filename xls '~/example.xls';
 75         data _null_;
 76           file xls;
 77           put 'garbage';
 78         run;
 
 NOTE: The file XLS is:
       Filename=/home/tom.abernathy/example.xls,
       Owner Name=tom.abernathy,Group Name=oda,
       Access Permission=-rw-r--r--,
       Last Modified=10Jun2026:11:29:46
 
 NOTE: 1 record was written to the file XLS.
       The minimum record length was 7.
       The maximum record length was 7.
 NOTE: DATA statement used (Total process time):
       real time           0.88 seconds
       cpu time            0.05 seconds
       
 
 79         proc export data=sashelp.class dbms=xls file=xls replace;
 80         run;
 
 NOTE: The export data set has 19 observations and 5 variables.
 NOTE: "XLS" file was successfully created.
 NOTE: PROCEDURE EXPORT used (Total process time):
       real time           0.68 seconds
       cpu time            0.08 seconds
       
 &lt;/PRE&gt;
&lt;P&gt;Perhaps you are trying to write to a file that is already open in another application?&lt;/P&gt;
&lt;P&gt;Perhaps you downloaded the wrong file?&lt;/P&gt;
&lt;P&gt;Perhaps you have something wrong in your SAS installation? Open a ticket with SAS support.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 14:41:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989497#M380208</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-06-11T14:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989545#M380212</link>
      <description>&lt;P&gt;I just ran this on SAS On Demand, which is also on 9.4M8:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export
  data=sashelp.class
  file="~/class.xls"
  dbms=xls
  replace
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;After downloading the file to my Mac, it opened successfully both in MS Excel and LibreOffice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So it seems that you either have a problem with your particular SAS installation, or with the data itself.&lt;/P&gt;
&lt;P&gt;Questions to answer:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;on which particular platform is your SAS server installed?&lt;/LI&gt;
&lt;LI&gt;on which particular desktop do you open your files (Windows/Mac/Linux)?&lt;/LI&gt;
&lt;LI&gt;which application is used to open the files (include version/maintenance level)?&lt;/LI&gt;
&lt;LI&gt;and finally we need to see your data; post it as a self-contained DATA step with DATALINES, so we can exactly recreate your dataset in our environments&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 11 Jun 2026 08:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989545#M380212</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2026-06-11T08:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989548#M380214</link>
      <description>Thank you for testing the xls issue at your end.&lt;BR /&gt;SAS 9.4 M8 is installed on Linux&lt;BR /&gt;I am opening in windows 11 Enterprise.&lt;BR /&gt;My excel version is "Microsoft Excel for Microsoft 365 MSO(Version 2604 Build 16........) 64 bit.&lt;BR /&gt;&lt;BR /&gt;I will share data shortly.&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jun 2026 09:58:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989548#M380214</guid>
      <dc:creator>srinivasa_attot</dc:creator>
      <dc:date>2026-06-11T09:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to open xls file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989549#M380215</link>
      <description>Thanks Tom.. I will open a case with SAS tech support</description>
      <pubDate>Thu, 11 Jun 2026 09:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-open-xls-file/m-p/989549#M380215</guid>
      <dc:creator>srinivasa_attot</dc:creator>
      <dc:date>2026-06-11T09:59:35Z</dc:date>
    </item>
  </channel>
</rss>

