<?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: odstable - Format wird nicht übernommen in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917221#M361306</link>
    <description>Haben Sie diesen post gesehen? &lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/How-to-retain-the-Variable-Format-when-PROC-EXPORT-TO-EXCEL/td-p/357108" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/How-to-retain-the-Variable-Format-when-PROC-EXPORT-TO-EXCEL/td-p/357108&lt;/A&gt;</description>
    <pubDate>Wed, 21 Feb 2024 18:54:32 GMT</pubDate>
    <dc:creator>JosvanderVelden</dc:creator>
    <dc:date>2024-02-21T18:54:32Z</dc:date>
    <item>
      <title>odstable - Format wird nicht übernommen</title>
      <link>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917144#M361272</link>
      <description>&lt;P&gt;Hallo zusammen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mit proc format erstelle ich ein individuelels Format, das ich final in meiner Ergebnistabelle haben möchte. Mit Proc Report geht das wunderbar mit ods excel durch bis zu der Exceldatei.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc odstabel ignoriert es. Hat jemand eine Idee?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format ;&lt;/P&gt;&lt;P&gt;value dezi0_fmt&lt;BR /&gt;. = ' — '&lt;BR /&gt;.a = ' • '&lt;BR /&gt;.b = ' X'&lt;BR /&gt;.c = ' /'&lt;BR /&gt;.d = ' '&lt;BR /&gt;0 = ' — '&lt;BR /&gt;other = [f16.0]&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data class;&lt;/P&gt;&lt;P&gt;format age weight height dezi0_fmt.;&lt;/P&gt;&lt;P&gt;set sashelp.class;&lt;/P&gt;&lt;P&gt;if _N_ = 2 then do;age =0;weight =0; height = 0;end;&lt;BR /&gt;if _N_ = 3 then age =.;&lt;BR /&gt;if _N_ = 4 then age =.b;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title " " ;&lt;BR /&gt;footnote " ";&lt;BR /&gt;ods listing close;&lt;BR /&gt;ods html close;&lt;BR /&gt;ods excel file = "&amp;amp;M_output.class_TEST_b.xlsx"&lt;BR /&gt;options(&lt;BR /&gt;embedded_titles = "yes"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;ods excel&lt;BR /&gt;options(&lt;BR /&gt;sheet_name="VGR-DL-Tab-05-A-Teil-1"&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;title1 bc=white j=l "Jahr: &amp;amp;M_jahr_ooc. Test";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc odstable data=class;&lt;/P&gt;&lt;P&gt;column&lt;BR /&gt;age&lt;BR /&gt;sex&lt;BR /&gt;height&lt;BR /&gt;weight;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;define age;&lt;BR /&gt;STYLE ={ tagattr='format:# ### ### ### ##0 ; - # ### ### ### ##0 ; "0 "' } ;&lt;BR /&gt;header='AGE OF STUDENT';&lt;BR /&gt;format=dezi0_fmt.;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;define sex;&lt;BR /&gt;header='GENDER';&lt;BR /&gt;style={fontsize=10pt just=l foreground=blue borderrightstyle=dashed};&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;define weight;&lt;BR /&gt;header='WEIGHT';&lt;BR /&gt;format=dezi0_fmt.;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;define height;&lt;BR /&gt;header='HEIGHT';&lt;BR /&gt;STYLE ={ tagattr='format:# ### ### ### ##0 ; - # ### ### ### ##0 ; "0 "' } ;&lt;BR /&gt;format=dezi0_fmt.;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods excel close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;lg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;eric berger&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 11:57:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917144#M361272</guid>
      <dc:creator>E_Berger</dc:creator>
      <dc:date>2024-02-21T11:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: odstable - Format wird nicht übernommen</title>
      <link>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917221#M361306</link>
      <description>Haben Sie diesen post gesehen? &lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/How-to-retain-the-Variable-Format-when-PROC-EXPORT-TO-EXCEL/td-p/357108" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/How-to-retain-the-Variable-Format-when-PROC-EXPORT-TO-EXCEL/td-p/357108&lt;/A&gt;</description>
      <pubDate>Wed, 21 Feb 2024 18:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917221#M361306</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2024-02-21T18:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: odstable - Format wird nicht übernommen</title>
      <link>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917289#M361327</link>
      <description>&lt;P&gt;Running your code under Windows with SAS9.4M7 appears to work for me.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value dezi0_fmt
    . = ' — '
    .a = ' • '
    .b = ' X'
    .c = ' /'
    .d = ' '
    0 = ' — '
    other = [f16.0]
  ;
run;

data class;
  format age weight height dezi0_fmt.;
  set sashelp.class;

  if _N_ = 2 then
    do;
      age =0;
      weight =0;
      height = 0;
    end;

  if _N_ = 3 then
    age =.;

  if _N_ = 4 then
    age =.b;
run;

%let M_output=c:\temp\;
%let M_jahr_ooc=xxx_;
title " ";
footnote " ";
ods listing close;
ods html close;

ods excel file = "&amp;amp;M_output.class_TEST_b.xlsx"
  options(
  embedded_titles = "yes"
  )
;
ods excel
  options(
  sheet_name="VGR-DL-Tab-05-A-Teil-1"
  );
title1 bc=white j=l "Jahr: &amp;amp;M_jahr_ooc. Test";

proc odstable data=class;
  column
    age
    sex
    height
    weight;
  define age;
    STYLE ={ tagattr='format:# ### ### ### ##0 ; - # ### ### ### ##0 ; "0 "' };
    header='AGE OF STUDENT';
    format=dezi0_fmt.;
  end;

  define sex;
    header='GENDER';
    style={fontsize=10pt just=l foreground=blue borderrightstyle=dashed};
  end;

  define weight;
    header='WEIGHT';
    format=dezi0_fmt.;
  end;

  define height;
    header='HEIGHT';
    STYLE ={ tagattr='format:# ### ### ### ##0 ; - # ### ### ### ##0 ; "0 "' };
    format=dezi0_fmt.;
  end;
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1708565020683.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93993i9C0A9F9C442E1F78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1708565020683.png" alt="Patrick_0-1708565020683.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 01:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917289#M361327</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-02-22T01:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: odstable - Format wird nicht übernommen</title>
      <link>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917307#M361338</link>
      <description>&lt;P&gt;Hallo Patrick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;das funktioniert. Vielen Dank! Das Problem waren die führenden blanks in dem Proc Format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eine andere Lösung, wenn man mit den führenden blanks im Proc Format arbeiten will,&lt;/P&gt;&lt;P&gt;ist die Angabe der Länge des Formats im define statement&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;define height;&lt;BR /&gt;header='HEIGHT';&lt;BR /&gt;STYLE ={ tagattr='format:# ### ### ### ##0 ; - # ### ### ### ##0 ; "0 "' };&lt;BR /&gt;format=dezi0_fmt&lt;FONT size="7"&gt;&lt;STRONG&gt;16&lt;/STRONG&gt;&lt;/FONT&gt;.;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;Gruß&lt;/P&gt;&lt;P&gt;eric berger&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 05:47:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917307#M361338</guid>
      <dc:creator>E_Berger</dc:creator>
      <dc:date>2024-02-22T05:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: odstable - Format wird nicht übernommen</title>
      <link>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917318#M361347</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17128"&gt;@E_Berger&lt;/a&gt;&amp;nbsp;Good that you've got a solution. As you can see in my environment things worked even with the leading blanks. The screenshot from the Excel I've posted had been created with the exact code I've posted.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 08:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/odstable-Format-wird-nicht-%C3%BCbernommen/m-p/917318#M361347</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-02-22T08:34:55Z</dc:date>
    </item>
  </channel>
</rss>

