<?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 : Export data to three(multiply) different sheets in Excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229147#M41434</link>
    <description>&lt;P&gt;I expect that you had a number of error messages. It is often helpful to explain those when shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When using the Firstobs and obs DATASET options they go in parantheses after the data set:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data = mydata (firstobs=900001 obs=1800000);&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2015 15:37:21 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-10-08T15:37:21Z</dc:date>
    <item>
      <title>PROC EXPORT : Export data to three(multiply) different sheets in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229143#M41433</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to export the command below to excel as 3 different sheet or 3 different excel files. I want it to do this every 900.000 rows. And ı have tried another method and it didnt work. Can you help me about this? Unfortunately i dont have data about the problem. So i can only send the code. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC EXPORT DATA= HVERGI.Sorgulanacak_vergi_plaka_1 (WHERE=( _N_ &amp;lt; 900001))
            OUTFILE= "D:\SAS\HVERGI\SORGULANACAK_VERGI_PLAKA_1_2.xlsx" 
            DBMS=EXCEL REPLACE;
     SHEET="VP1"; 
RUN;
/*---------------------------------------------------------------------------------------------------------------*/
options obs= 900000;&lt;BR /&gt; PROC EXPORT DATA= HVERGI.Sorgulanacak_vergi_plaka_1 
DBMS=xlsx            
OUTFILE= "D:\SAS\HVERGI\SORGULANACAK_VERGI_PLAKA_1_3.xlsx" 
                REPLACE;
RUN;

options firstobs= 900001; 
options obs= 1800000;
PROC EXPORT DATA= HVERGI.Sorgulanacak_vergi_plaka_1 
DBMS=xlsx            
OUTFILE= "D:\SAS\HVERGI\SORGULANACAK_VERGI_PLAKA_1_4.xlsx" 
                REPLACE;
RUN;


options firstobs= 1800001; 
options obs= max; 
PROC EXPORT DATA= HVERGI.Sorgulanacak_vergi_plaka_1 
DBMS=xlsx            
 OUTFILE= "D:\SAS\HVERGI\SORGULANACAK_VERGI_PLAKA_1_5.xlsx" 
REPLACE;
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Oct 2015 15:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229143#M41433</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-10-08T15:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: PROC EXPORT : Export data to three(multiply) different sheets in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229147#M41434</link>
      <description>&lt;P&gt;I expect that you had a number of error messages. It is often helpful to explain those when shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When using the Firstobs and obs DATASET options they go in parantheses after the data set:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data = mydata (firstobs=900001 obs=1800000);&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 15:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229147#M41434</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-10-08T15:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC EXPORT : Export data to three(multiply) different sheets in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229159#M41441</link>
      <description>&lt;P&gt;Thank you ballardw.&lt;/P&gt;
&lt;P&gt;I ran the second code i created and I didnt receive any errors. Though, is there another method? Such as writing as sheets and writing seperate excel files. For example, first 900000 rows will be one sheet and second 900000 rows will be another sheet.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 16:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229159#M41441</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-10-08T16:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: PROC EXPORT : Export data to three(multiply) different sheets in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229201#M41454</link>
      <description>&lt;P&gt;In the first code, program see _n_ as like column and gets error. after the where statement what do i have to write instead of _n_. ? As you know _n_ option provides rows of count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 22:51:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229201#M41454</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-10-08T22:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC EXPORT : Export data to three(multiply) different sheets in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229505#M41540</link>
      <description>&lt;P&gt;Is it possible to use where statement to reach my aim. As i said i tried the code like as below but it didn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;PROC&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;EXPORT&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; HVERGI&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Sorgulanacak_vergi_plaka_1 &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; &lt;STRONG&gt;_N_ &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;900001&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
            OUTFILE&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"D:\SAS\HVERGI\SORGULANACAK_VERGI_PLAKA_1_2.xlsx"&lt;/SPAN&gt; 
            DBMS&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;EXCEL&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;REPLACE&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
     SHEET&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"VP1"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; 
&lt;SPAN class="token procnames"&gt;RUN&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Oct 2015 07:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229505#M41540</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-10-12T07:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC EXPORT : Export data to three(multiply) different sheets in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229832#M41632</link>
      <description>&lt;P&gt;Use the dataset options FIRSTOBS and OBS rather than the system options.&lt;/P&gt;
&lt;P&gt;No need to post your data as we can write the program using one of the available datasets in SASHELP library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path=%sysfunc(pathname(work));

proc export data=sashelp.class (firstobs=1 obs=6)
   outfile= "&amp;amp;path/one.xlsx"
   dbms=xlsx replace
;
  sheet="one";
run;

proc export data=sashelp.class (firstobs=7 obs=12)
   outfile= "&amp;amp;path/two.xlsx"
   dbms=xlsx replace
;
  sheet="two";
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Oct 2015 03:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229832#M41632</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-10-14T03:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC EXPORT : Export data to three(multiply) different sheets in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229973#M41658</link>
      <description>&lt;P&gt;Thank you Tom. I will consider your recommendation but it goes without saying that sometimes i need to post my data to better explanation.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2015 20:55:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-Export-data-to-three-multiply-different-sheets-in/m-p/229973#M41658</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-10-14T20:55:10Z</dc:date>
    </item>
  </channel>
</rss>

