<?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: Exporting numeric variable to Excel Table but shows as character in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/607514#M35172</link>
    <description>&lt;P&gt;Also, when you use Export as a Step in Project, are you exporting to .xlsx I assume?&amp;nbsp; Or .xls?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two main ways in which EG will "send/export data" to Excel, each with advantages/disadvantages...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) &lt;STRONG&gt;Favor value integrity.&lt;/STRONG&gt;&amp;nbsp; Insert raw values into Excel cells and then apply Excel formats that map as close as possible to the SAS formats associated with each column.&amp;nbsp; Ensures raw values are preserved, but may not display the same in Excel as they do in SAS, since there is not a 1-to-1 mapping of SAS-to-Excel formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) &lt;STRONG&gt;Favor display integrity.&lt;/STRONG&gt;&amp;nbsp; Insert formatted values into Excel cells and let Excel interpret the format.&amp;nbsp; (Similar to manually typing a value into a cell whose format is General.)&amp;nbsp; Ensures the displayed value in Excel will be more consistent with the displayed value in SAS, but may not be a recognized format by Excel and may not retain the underlying raw value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2019 21:52:05 GMT</pubDate>
    <dc:creator>CaseySmith</dc:creator>
    <dc:date>2019-11-26T21:52:05Z</dc:date>
    <item>
      <title>Exporting numeric variable to Excel Table but shows as character</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/592158#M34776</link>
      <description>&lt;P&gt;Hello, I've searched high and low and haven't found the answer that will help me solve this problem.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In SAS there are multiple variables that I am using that are numeric.&amp;nbsp; When I use the "Send To Excel" export function I seems to hold the "numeric" format.&amp;nbsp; However, when I Export as a Step in Project and then use a data connection into an Excel Table it pulls in most of the numeric fields but makes 3 numeric variables as characters.&amp;nbsp; If I want them to be used as numbers I have to use the "Text to Columns" function.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I also have re-imported the excel workbook that gets exported, set the formats to exactly the same values as the other numeric variables then re-exported it and the same thing happens. I tired to even create new computed columns to see if that would work and it has not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts would be very helpful! I'm not sure why it does this for only some of the numeric variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 14:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/592158#M34776</guid>
      <dc:creator>mmagnuson</dc:creator>
      <dc:date>2019-09-27T14:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting numeric variable to Excel Table but shows as character</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/592190#M34777</link>
      <description>&lt;P&gt;Example data 1)&amp;nbsp;as a data set (SAS data) in the form of data step code so we can see actual properties and values and 2) of the exported data without actually opening in Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also if you provide the log generated from the "data connection into an Excel Table" that may help.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 15:07:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/592190#M34777</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-27T15:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting numeric variable to Excel Table but shows as character</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/592217#M34778</link>
      <description>&lt;P&gt;I have a feeling that the formats on the variables are causing the problem. Try removing the formats from the variables, and then exporting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 15:57:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/592217#M34778</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2019-09-27T15:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting numeric variable to Excel Table but shows as character</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/592435#M34779</link>
      <description>Hi, I tried to remove the formats but it still didn’t work. I’ll try to copy/paste the code on Monday&lt;BR /&gt;</description>
      <pubDate>Sat, 28 Sep 2019 22:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/592435#M34779</guid>
      <dc:creator>mmagnuson</dc:creator>
      <dc:date>2019-09-28T22:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting numeric variable to Excel Table but shows as character</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/607514#M35172</link>
      <description>&lt;P&gt;Also, when you use Export as a Step in Project, are you exporting to .xlsx I assume?&amp;nbsp; Or .xls?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two main ways in which EG will "send/export data" to Excel, each with advantages/disadvantages...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) &lt;STRONG&gt;Favor value integrity.&lt;/STRONG&gt;&amp;nbsp; Insert raw values into Excel cells and then apply Excel formats that map as close as possible to the SAS formats associated with each column.&amp;nbsp; Ensures raw values are preserved, but may not display the same in Excel as they do in SAS, since there is not a 1-to-1 mapping of SAS-to-Excel formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) &lt;STRONG&gt;Favor display integrity.&lt;/STRONG&gt;&amp;nbsp; Insert formatted values into Excel cells and let Excel interpret the format.&amp;nbsp; (Similar to manually typing a value into a cell whose format is General.)&amp;nbsp; Ensures the displayed value in Excel will be more consistent with the displayed value in SAS, but may not be a recognized format by Excel and may not retain the underlying raw value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 21:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Exporting-numeric-variable-to-Excel-Table-but-shows-as-character/m-p/607514#M35172</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2019-11-26T21:52:05Z</dc:date>
    </item>
  </channel>
</rss>

