<?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 Different Formats in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529719#M5588</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to export to Excel from SAS, but need to uphold a certain set of formats.. Not sure how or if SAS&amp;nbsp;is able to do them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Can the Row of the Excel export be set to a certain height .. eg. 42&lt;/P&gt;
&lt;P&gt;2. Vertical alignment to Centre&lt;/P&gt;
&lt;P&gt;3. Wrap text&lt;/P&gt;
&lt;P&gt;4. Bold font&lt;/P&gt;
&lt;P&gt;5. Autofit column widths&amp;nbsp; eg. 11&lt;/P&gt;
&lt;P&gt;6. Format columns&amp;nbsp;to “d-mmm-yy”, width 9&lt;/P&gt;
&lt;P&gt;7. Hide a column&lt;/P&gt;
&lt;P&gt;8. Delete a column on certain sheets&lt;/P&gt;
&lt;P&gt;9. Add a new sheet&lt;/P&gt;
&lt;P&gt;10. Set file attribute to read-only&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you in advance&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 15:49:31 GMT</pubDate>
    <dc:creator>podarum</dc:creator>
    <dc:date>2019-01-24T15:49:31Z</dc:date>
    <item>
      <title>Different Formats</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529719#M5588</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to export to Excel from SAS, but need to uphold a certain set of formats.. Not sure how or if SAS&amp;nbsp;is able to do them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Can the Row of the Excel export be set to a certain height .. eg. 42&lt;/P&gt;
&lt;P&gt;2. Vertical alignment to Centre&lt;/P&gt;
&lt;P&gt;3. Wrap text&lt;/P&gt;
&lt;P&gt;4. Bold font&lt;/P&gt;
&lt;P&gt;5. Autofit column widths&amp;nbsp; eg. 11&lt;/P&gt;
&lt;P&gt;6. Format columns&amp;nbsp;to “d-mmm-yy”, width 9&lt;/P&gt;
&lt;P&gt;7. Hide a column&lt;/P&gt;
&lt;P&gt;8. Delete a column on certain sheets&lt;/P&gt;
&lt;P&gt;9. Add a new sheet&lt;/P&gt;
&lt;P&gt;10. Set file attribute to read-only&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you in advance&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 15:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529719#M5588</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2019-01-24T15:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Different Formats</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529723#M5591</link>
      <description>&lt;P&gt;You can use ods excel to create the Excel file, which has options for a lot of what you want, from the docs:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings17/0169-2017.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings17/0169-2017.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With this, use proc report to generate your report and then within that report definition you apply specific excel formats to the data:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings13/316-2013.pdf" target="_blank" rel="noopener"&gt;http://support.sas.com/resources/papers/proceedings13/316-2013.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(whilst the above uses tagsets.excelxp, it should be valid for ods excel as well).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to add, your last couple of requests are not possible.&amp;nbsp; You can read/write data to and from excel, and create sheets by pushing out data to them.&amp;nbsp; You cannot however, perform other Excel functions such as deleting columns, setting attributes and such like which is Excel specific.&amp;nbsp; To do such things consider using a VBA macro to load your Excel file, as VBA is embedded into Excel it can take care of that type of functionality.&amp;nbsp; I would question why you need to do this from a third party app in the first pace however.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 15:58:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529723#M5591</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-01-24T15:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Different Formats</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529725#M5592</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;ODS EXCEL and/or Tagsets.ExcelXP can do most of those.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Options are listed here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html" target="_blank"&gt;https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1797"&gt;@podarum&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to export to Excel from SAS, but need to uphold a certain set of formats.. Not sure how or if SAS&amp;nbsp;is able to do them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Can the Row of the Excel export be set to a certain height .. eg. 42&lt;/P&gt;
&lt;P&gt;2. Vertical alignment to Centre&lt;/P&gt;
&lt;P&gt;3. Wrap text&lt;/P&gt;
&lt;P&gt;4. Bold font&lt;/P&gt;
&lt;P&gt;5. Autofit column widths&amp;nbsp; eg. 11&lt;/P&gt;
&lt;P&gt;6. Format columns&amp;nbsp;to “d-mmm-yy”, width 9&lt;/P&gt;
&lt;P&gt;7. Hide a column&lt;/P&gt;
&lt;P&gt;8. Delete a column on certain sheets&lt;/P&gt;
&lt;P&gt;9. Add a new sheet&lt;/P&gt;
&lt;P&gt;10. Set file attribute to read-only&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you in advance&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:00:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529725#M5592</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-24T16:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Different Formats</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529752#M5596</link>
      <description>&lt;P&gt;If a value is date that you want to display a "d-mmm-yy" you will need a custom format. I think the one below does what you want.&lt;/P&gt;
&lt;PRE&gt;proc format library=work;
picture dashdate
low - high ='%d-%b-%0y'  (datatype=date)
;
run;

data example;
   x='10JAN2009'd;
   put x dashdate.;
run;&lt;/PRE&gt;
&lt;P&gt;the %0y says to insert a zero if the last two digits of a year are less than 10. If you want the day to be two digits with a leading zero use %0d.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the value is not a SAS date value you need to create the character value somewhere as a format is likely not the want to manipulate character "dates".&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529752#M5596</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-24T16:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Different Formats</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529757#M5597</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to add, your last couple of requests are not possible.&amp;nbsp; You can read/write data to and from excel, and create sheets by pushing out data to them.&amp;nbsp; You cannot however, perform other Excel functions such as deleting columns, setting attributes and such like which is Excel specific.&amp;nbsp; To do such things consider using a VBA macro to load your Excel file, as VBA is embedded into Excel it can take care of that type of functionality.&amp;nbsp; I would question why you need to do this from a third party app in the first pace however.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But you can drop columns ahead of time and/or conditionally for some sheets.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's the PROTECT_WORKSHEET option in ODS EXCEL which will&amp;nbsp;set the file to Read Only.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 16:59:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Different-Formats/m-p/529757#M5597</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-24T16:59:57Z</dc:date>
    </item>
  </channel>
</rss>

