<?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 trunncating my label in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/331626#M74556</link>
    <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks for your response!&amp;nbsp; I've pasted my code below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Specifically, I have a data step where I create data set called test and include labels for the variables.&amp;nbsp;&amp;nbsp;Then, I have a proc export step where I output the dataset test, specify which variables to keep (I list all variables; I use the KEEP statement because this was suggested as a possible solution to my labels being truncated), and include the LABEL statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I recieve ERROR: Too many fields defined.&amp;nbsp; If the first part of two of my labels are similiar (like in the sample code where the labels for the variables, referral and linkage, are similiar) then I recieve ERROR:&amp;nbsp; The field "If the client ...." has already been defined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm outputting in&amp;nbsp;Excel and not CSV because I need a workbook with mult. sheets.&amp;nbsp; Thank you for your help -- I appreciate it!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;***&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; test; retain grantee_id client_id visit_dt data_issue form_typet rap_hepB_test_res_text rap_hepC_test_res_text rap_hep_retest_res_text&lt;/P&gt;
&lt;P&gt;conf_hep_test_res_text rap_hepB_retest_res_text rap_hepC_retest_res_text conf_hepB_test_res conf_hepC_test_res clar_other grantee_note referral linkage&lt;/P&gt;
&lt;P&gt;clar_received resolved data_period dup_id;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;set test0;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;label&lt;/P&gt;
&lt;P&gt;client_id="Client ID"&lt;/P&gt;
&lt;P&gt;visit_dt="Date of Visit"&lt;/P&gt;
&lt;P&gt;data_issue="Data Issue"&lt;/P&gt;
&lt;P&gt;rap_hepB_test_res_text="Rapid Hep B Test Result"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rap_hepC_test_res_text="Rapid Hep C Test Result"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rap_hep_retest_res_text="Rapid Hep Retest Result (Hep type not distinguished on form so we need to know what Hep type retest was for)"&lt;/P&gt;
&lt;P&gt;conf_hep_test_res_text="Confirmatory Hep Test Result (Hep type not distinguished on form so we need to know what Hep type test was for or if client had confirmatory tests for both Hep B and Hep C)"&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rap_hepB_retest_res_text="Rapid Hep B Retest Result (enter result here if rapid Hep B retest given)"&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rap_hepC_retest_res_text="Rapid Hep C Retest Result (enter result here if rapid Hep B retest given)"&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;conf_hepB_test_res="Confirmatory Hep B Test Result (enter result here if confirmatory Hep B test given)"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;conf_hepC_test_res="Confirmatory Hep C Test Result (enter result here if confirmatory Hep C test given)"&lt;/P&gt;
&lt;P&gt;clar_other="Form Has Additional Clarification Requests on Other Tabs of This Excel File"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;grantee_note="Please Provide Data Updates Here"&lt;/P&gt;
&lt;P&gt;referral="If client recieved positive Hep conf result, then please provide referral status"&lt;/P&gt;
&lt;P&gt;linkage="If client recieved positive Hep conf result, then please provide linkage status"&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc export data=test&lt;/P&gt;
&lt;P&gt;outfile="filepath\filename..xlsx"&lt;/P&gt;
&lt;P&gt;dbms=excel LABEL&lt;/P&gt;
&lt;P&gt;replace;&lt;/P&gt;
&lt;P&gt;sheet="HIV";&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2017 18:40:00 GMT</pubDate>
    <dc:creator>Maisha_Huq</dc:creator>
    <dc:date>2017-02-10T18:40:00Z</dc:date>
    <item>
      <title>Proc export trunncating my label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/331532#M74521</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use proc export to&amp;nbsp;produce Excel spreadsheets, however, my variable names' labels are truncated.&amp;nbsp; The labels are truncated after my using the label statement in the proc export step.&amp;nbsp; Do you know what I can do to preserve the whole length of all labels?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!! Please let me know if I can be clearer/more specific.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 14:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/331532#M74521</guid>
      <dc:creator>Maisha_Huq</dc:creator>
      <dc:date>2017-02-10T14:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export trunncating my label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/331537#M74523</link>
      <description>&lt;P&gt;Please post your code and example data (either make use of sashelp.class or similar, or post data in a data step) to llustrate what exactly happens.&lt;/P&gt;
&lt;P&gt;Are parts of the labels missing, or are the columns just too narrow when the file is opened in Excel and need to be expanded?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 15:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/331537#M74523</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-10T15:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export trunncating my label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/331626#M74556</link>
      <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks for your response!&amp;nbsp; I've pasted my code below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Specifically, I have a data step where I create data set called test and include labels for the variables.&amp;nbsp;&amp;nbsp;Then, I have a proc export step where I output the dataset test, specify which variables to keep (I list all variables; I use the KEEP statement because this was suggested as a possible solution to my labels being truncated), and include the LABEL statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I recieve ERROR: Too many fields defined.&amp;nbsp; If the first part of two of my labels are similiar (like in the sample code where the labels for the variables, referral and linkage, are similiar) then I recieve ERROR:&amp;nbsp; The field "If the client ...." has already been defined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm outputting in&amp;nbsp;Excel and not CSV because I need a workbook with mult. sheets.&amp;nbsp; Thank you for your help -- I appreciate it!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;***&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; test; retain grantee_id client_id visit_dt data_issue form_typet rap_hepB_test_res_text rap_hepC_test_res_text rap_hep_retest_res_text&lt;/P&gt;
&lt;P&gt;conf_hep_test_res_text rap_hepB_retest_res_text rap_hepC_retest_res_text conf_hepB_test_res conf_hepC_test_res clar_other grantee_note referral linkage&lt;/P&gt;
&lt;P&gt;clar_received resolved data_period dup_id;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;set test0;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;label&lt;/P&gt;
&lt;P&gt;client_id="Client ID"&lt;/P&gt;
&lt;P&gt;visit_dt="Date of Visit"&lt;/P&gt;
&lt;P&gt;data_issue="Data Issue"&lt;/P&gt;
&lt;P&gt;rap_hepB_test_res_text="Rapid Hep B Test Result"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rap_hepC_test_res_text="Rapid Hep C Test Result"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rap_hep_retest_res_text="Rapid Hep Retest Result (Hep type not distinguished on form so we need to know what Hep type retest was for)"&lt;/P&gt;
&lt;P&gt;conf_hep_test_res_text="Confirmatory Hep Test Result (Hep type not distinguished on form so we need to know what Hep type test was for or if client had confirmatory tests for both Hep B and Hep C)"&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rap_hepB_retest_res_text="Rapid Hep B Retest Result (enter result here if rapid Hep B retest given)"&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rap_hepC_retest_res_text="Rapid Hep C Retest Result (enter result here if rapid Hep B retest given)"&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;conf_hepB_test_res="Confirmatory Hep B Test Result (enter result here if confirmatory Hep B test given)"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;conf_hepC_test_res="Confirmatory Hep C Test Result (enter result here if confirmatory Hep C test given)"&lt;/P&gt;
&lt;P&gt;clar_other="Form Has Additional Clarification Requests on Other Tabs of This Excel File"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;grantee_note="Please Provide Data Updates Here"&lt;/P&gt;
&lt;P&gt;referral="If client recieved positive Hep conf result, then please provide referral status"&lt;/P&gt;
&lt;P&gt;linkage="If client recieved positive Hep conf result, then please provide linkage status"&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc export data=test&lt;/P&gt;
&lt;P&gt;outfile="filepath\filename..xlsx"&lt;/P&gt;
&lt;P&gt;dbms=excel LABEL&lt;/P&gt;
&lt;P&gt;replace;&lt;/P&gt;
&lt;P&gt;sheet="HIV";&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 18:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/331626#M74556</guid>
      <dc:creator>Maisha_Huq</dc:creator>
      <dc:date>2017-02-10T18:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export trunncating my label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/332087#M74711</link>
      <description>&lt;P&gt;Quick shot from the hip:&lt;/P&gt;
&lt;P&gt;Could you please try what happens when you use dbms=xlsx instead of dbms=excel?&lt;/P&gt;
&lt;P&gt;The dbms=excel method seems to have certain limitations because of the MS-supplied (yucc!) module used.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 07:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/332087#M74711</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-13T07:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export trunncating my label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/332228#M74754</link>
      <description>&lt;P&gt;Thank you, KurtBremser -- using "xlsx" instead of "excel" resolved the label issue!!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 16:14:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-trunncating-my-label/m-p/332228#M74754</guid>
      <dc:creator>Maisha_Huq</dc:creator>
      <dc:date>2017-02-13T16:14:32Z</dc:date>
    </item>
  </channel>
</rss>

