<?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: proc export, dbms=xlsx - unexpected result when newfile=yes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648423#M194223</link>
    <description>&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 70         
 71         filename demo "~/dat/class.xlsx";
 72         
 73         proc export data    = sashelp.class
 74                     dbms    = xlsx
 75                     outfile = demo;
 76              sheet='All Students'n;
 77         run;
 
 NOTE: The export data set has 19 observations and 5 variables.
 NOTE: "DEMO" file was successfully created.
 NOTE: PROCEDURE EXPORT used (Total process time):
       real time           0.01 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              2471.43k
       OS Memory           29532.00k
       Timestamp           05/17/2020 06:18:55 PM
       Step Count                        24  Switch Count  0
       Page Faults                       0
       Page Reclaims                     831
       Page Swaps                        0
       Voluntary Context Switches        9
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           16
       
 
 78         
 79         filename demo;
 NOTE: Fileref DEMO has been deassigned.
 80         
 81         filename demo "~/dat/class.xlsx";
 82         
 83         proc export data    = sashelp.class (where=(sex='M'))
 84                     dbms    = xlsx /*excle*/
 85                     outfile = demo;
 86              newfile = y;
 87              sheet='Male'n;
 88         run;
 
 NOTE: The export data set has 10 observations and 5 variables.
 NOTE: "DEMO" file was successfully created.
 NOTE: PROCEDURE EXPORT used (Total process time):
       real time           0.01 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              2814.96k
       OS Memory           30044.00k
       Timestamp           05/17/2020 06:18:55 PM
       Step Count                        25  Switch Count  0
       Page Faults                       0
       Page Reclaims                     552
       Page Swaps                        0
       Voluntary Context Switches        21
       Involuntary Context Switches      0
       Block Input Operations            16
       Block Output Operations           16
       
 
 89         
 90         filename demo;
 NOTE: Fileref DEMO has been deassigned.
 91         
 92         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/PRE&gt;&lt;P&gt;It works for me on SODA (SAS On Demand for Academics) .&amp;nbsp; I am able to open the Excel file and view the contents in Windows 10&lt;/P&gt;</description>
    <pubDate>Sun, 17 May 2020 18:27:19 GMT</pubDate>
    <dc:creator>ghosh</dc:creator>
    <dc:date>2020-05-17T18:27:19Z</dc:date>
    <item>
      <title>proc export, dbms=xlsx - unexpected result when newfile=yes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648413#M194221</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using proc export, could it be that newfile=yes is not working with dbms=xlsx?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code add a second tab to an existing excel file&lt;/P&gt;&lt;P&gt;rather than deleting the first excel file and creating a new one with one two.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works as expected with dbms=excel tho.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename demo "&amp;amp;xxdemo./reporting/class.xlsx";

proc export data    = sashelp.class
            dbms    = xlsx
            outfile = demo;
     sheet='All Students'n;
run;

filename demo;

filename demo "&amp;amp;xxdemo./reporting/class.xlsx";

proc export data    = sashelp.class (where=(sex='M'))
            dbms    = xlsx /*excle*/
            outfile = demo;
     newfile = y;
     sheet='Male'n;
run;

filename demo;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 May 2020 17:04:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648413#M194221</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2020-05-17T17:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc export, dbms=xlsx - unexpected result when newfile=yes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648423#M194223</link>
      <description>&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 70         
 71         filename demo "~/dat/class.xlsx";
 72         
 73         proc export data    = sashelp.class
 74                     dbms    = xlsx
 75                     outfile = demo;
 76              sheet='All Students'n;
 77         run;
 
 NOTE: The export data set has 19 observations and 5 variables.
 NOTE: "DEMO" file was successfully created.
 NOTE: PROCEDURE EXPORT used (Total process time):
       real time           0.01 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              2471.43k
       OS Memory           29532.00k
       Timestamp           05/17/2020 06:18:55 PM
       Step Count                        24  Switch Count  0
       Page Faults                       0
       Page Reclaims                     831
       Page Swaps                        0
       Voluntary Context Switches        9
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           16
       
 
 78         
 79         filename demo;
 NOTE: Fileref DEMO has been deassigned.
 80         
 81         filename demo "~/dat/class.xlsx";
 82         
 83         proc export data    = sashelp.class (where=(sex='M'))
 84                     dbms    = xlsx /*excle*/
 85                     outfile = demo;
 86              newfile = y;
 87              sheet='Male'n;
 88         run;
 
 NOTE: The export data set has 10 observations and 5 variables.
 NOTE: "DEMO" file was successfully created.
 NOTE: PROCEDURE EXPORT used (Total process time):
       real time           0.01 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              2814.96k
       OS Memory           30044.00k
       Timestamp           05/17/2020 06:18:55 PM
       Step Count                        25  Switch Count  0
       Page Faults                       0
       Page Reclaims                     552
       Page Swaps                        0
       Voluntary Context Switches        21
       Involuntary Context Switches      0
       Block Input Operations            16
       Block Output Operations           16
       
 
 89         
 90         filename demo;
 NOTE: Fileref DEMO has been deassigned.
 91         
 92         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/PRE&gt;&lt;P&gt;It works for me on SODA (SAS On Demand for Academics) .&amp;nbsp; I am able to open the Excel file and view the contents in Windows 10&lt;/P&gt;</description>
      <pubDate>Sun, 17 May 2020 18:27:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648423#M194223</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-05-17T18:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: proc export, dbms=xlsx - unexpected result when newfile=yes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648424#M194224</link>
      <description>&lt;P&gt;This is documented behavior. SAS will create a new &lt;EM&gt;spreadsheet&lt;/EM&gt;; if the Excel file already exists, no new file is created, but a new sheet within the file. If the sheet already exists, and no REPLACE option is given, the sheet is not overwritten, and you will be notified.&lt;/P&gt;</description>
      <pubDate>Sun, 17 May 2020 18:56:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648424#M194224</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-17T18:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc export, dbms=xlsx - unexpected result when newfile=yes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648429#M194228</link>
      <description>I can see the content of the file. It is just the one I was expected. I was expecting the same one as with dbms=excel.</description>
      <pubDate>Sun, 17 May 2020 19:48:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648429#M194228</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2020-05-17T19:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: proc export, dbms=xlsx - unexpected result when newfile=yes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648430#M194229</link>
      <description>I could not find the documentation where newfile=yes was not working with dbms=xlsx. Would you have the link?</description>
      <pubDate>Sun, 17 May 2020 19:49:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648430#M194229</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2020-05-17T19:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: proc export, dbms=xlsx - unexpected result when newfile=yes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648434#M194233</link>
      <description>&lt;P&gt;See :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=acpcref&amp;amp;docsetTarget=n0msy4hy1so0ren1acm90iijxn8j.htm&amp;amp;locale=de#p09degjribu2smn1eaqt5eq9on58" target="_blank" rel="noopener"&gt;Microsoft Excel Workbook Files&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(scroll down to NEWFILE=):&lt;/P&gt;
&lt;P&gt;Restriction Available only for DBMS=XLS for backward compatibility.&lt;/P&gt;</description>
      <pubDate>Sun, 17 May 2020 20:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648434#M194233</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-17T20:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc export, dbms=xlsx - unexpected result when newfile=yes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648435#M194234</link>
      <description>Thank you Kurt</description>
      <pubDate>Sun, 17 May 2020 20:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-dbms-xlsx-unexpected-result-when-newfile-yes/m-p/648435#M194234</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2020-05-17T20:21:01Z</dc:date>
    </item>
  </channel>
</rss>

