<?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 SAS proc export to reduce excel file size in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720083#M223030</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the below code to export a dataset into an xlsx file which is 24Mb in size.&lt;/P&gt;&lt;P&gt;proc export data= work.mydata&lt;BR /&gt;Outfile = "/location/file.xlsx" dbms = xlsx replace;&lt;BR /&gt;sheet='Base';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to reduce the size of the file as this file is anticipated to grow in size.&lt;/P&gt;&lt;P&gt;I tried generating a .csv file in many ways but they all increased the file size to 55 Mb!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CSV code1 used:&lt;/P&gt;&lt;P&gt;/****file size 55Mb******/&lt;/P&gt;&lt;P&gt;filename _dataout zip "/location/file.zip" member="file.csv";&lt;/P&gt;&lt;P&gt;proc export data=work.mydata&lt;BR /&gt;outfile=_dataout&lt;BR /&gt;dbms=csv replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/* although the zip file compressed the file but when tried to save the .csv on the desktop it retained the original csv size of 55Mb*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;csv code2 used:&lt;/P&gt;&lt;P&gt;proc export data=work.mydata&lt;BR /&gt;outfile="location/file.csv" dbms = csv replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/****file size 55Mb******/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Csv code3 used:&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;set work.mydata;&lt;BR /&gt;file '/location/file.csv' dlm=',' dsd ;&lt;BR /&gt;put (_all_) (:) ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/****file size 55Mb******/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can anyone please help me reduce the file size.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Feb 2021 00:57:26 GMT</pubDate>
    <dc:creator>phoenix31</dc:creator>
    <dc:date>2021-02-18T00:57:26Z</dc:date>
    <item>
      <title>SAS proc export to reduce excel file size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720083#M223030</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the below code to export a dataset into an xlsx file which is 24Mb in size.&lt;/P&gt;&lt;P&gt;proc export data= work.mydata&lt;BR /&gt;Outfile = "/location/file.xlsx" dbms = xlsx replace;&lt;BR /&gt;sheet='Base';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to reduce the size of the file as this file is anticipated to grow in size.&lt;/P&gt;&lt;P&gt;I tried generating a .csv file in many ways but they all increased the file size to 55 Mb!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CSV code1 used:&lt;/P&gt;&lt;P&gt;/****file size 55Mb******/&lt;/P&gt;&lt;P&gt;filename _dataout zip "/location/file.zip" member="file.csv";&lt;/P&gt;&lt;P&gt;proc export data=work.mydata&lt;BR /&gt;outfile=_dataout&lt;BR /&gt;dbms=csv replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/* although the zip file compressed the file but when tried to save the .csv on the desktop it retained the original csv size of 55Mb*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;csv code2 used:&lt;/P&gt;&lt;P&gt;proc export data=work.mydata&lt;BR /&gt;outfile="location/file.csv" dbms = csv replace;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/****file size 55Mb******/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Csv code3 used:&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;set work.mydata;&lt;BR /&gt;file '/location/file.csv' dlm=',' dsd ;&lt;BR /&gt;put (_all_) (:) ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/****file size 55Mb******/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can anyone please help me reduce the file size.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 00:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720083#M223030</guid>
      <dc:creator>phoenix31</dc:creator>
      <dc:date>2021-02-18T00:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc export to reduce excel file size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720088#M223033</link>
      <description>&lt;P&gt;Couple of things that might work:&lt;/P&gt;
&lt;P&gt;1. Cutting down the CHAR variable lengths.&lt;/P&gt;
&lt;P&gt;2. Remove compression from the SAS dataset if compressed. Use PROC CONTENTS to check.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 02:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720088#M223033</guid>
      <dc:creator>qoit</dc:creator>
      <dc:date>2021-02-18T02:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc export to reduce excel file size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720109#M223042</link>
      <description>&lt;P&gt;xlsx-files will be smaller than csv-files most times, because a xslx-file is just a zipped collection of xml-files. On a windows system, i would recommend using file-system-compression, but i don't know if a similar feature is available in your environment. Why do you have to export the file at all? Why not saving the dataset in a permanent library?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 05:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720109#M223042</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-02-18T05:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc export to reduce excel file size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720216#M223090</link>
      <description>&lt;P&gt;Thank you for the information..&lt;/P&gt;&lt;P&gt;The file has to be sent through email and the team needs it in one of the excel formats..&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 15:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720216#M223090</guid>
      <dc:creator>phoenix31</dc:creator>
      <dc:date>2021-02-18T15:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc export to reduce excel file size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720224#M223095</link>
      <description>&lt;P&gt;As noted, Excel files are already ZIP-compressed, and you could only make your file smaller by reducing the data as such. And I don't mean to get rid of blanks (these are eliminated by the compression anyway), you have to &lt;U&gt;&lt;EM&gt;reduce information&lt;/EM&gt;&lt;/U&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead of sending around emails, use a shared storage resource and send links to that.&lt;/P&gt;
&lt;P&gt;We simply store such data on our SAS server, and have users use SFTP clients to download it.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 15:44:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-export-to-reduce-excel-file-size/m-p/720224#M223095</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-02-18T15:44:27Z</dc:date>
    </item>
  </channel>
</rss>

