<?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: Number format change when export to csv in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509548#M136990</link>
    <description>Two possibilities.&lt;BR /&gt;1. SAS is exporting the value as a character. Check the csv file in a TEXT EDITOR, not Excel. If you see quoatation marks around the value, that's your issue. &lt;BR /&gt;&lt;BR /&gt;2. Your other software package (MT4) is not reading the data in correctly for some reason. This may have to do with the software. A csv has no forced types so the application is usually guessing and sometimes they guess wrong.</description>
    <pubDate>Thu, 01 Nov 2018 14:55:14 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-11-01T14:55:14Z</dc:date>
    <item>
      <title>Number format change when export to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509405#M136952</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I export data to csv file. Then I load this csv file to a different software (MT4) and this software doesn't read number as numeric.&lt;/P&gt;
&lt;P&gt;I have to open the csv file, select all data and click on the number setting with Icon Comma (Comma Style) in Excel.&lt;/P&gt;
&lt;P&gt;Then save it.&lt;/P&gt;
&lt;P&gt;Now the software read everything correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS code, I try to change format of all numeric into 6.2 before export. But still not helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure you can suggest me any procedure to fix that bug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;		proc export data=Low_dot_normal
		outfile="E:\export_value.csv" replace;run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 03:12:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509405#M136952</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2018-11-01T03:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Number format change when export to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509408#M136953</link>
      <description>&lt;P&gt;It's certainly not a bug. SAS will either use the format permanently assigned to the variable or if there isn't one then it will use the default format. So if you need numeric values written out in a specific way then make sure that you first assign the correct format to the variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And to check what SAS writes to a .csv don't use Excel to open the data but a text editor.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 03:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509408#M136953</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-11-01T03:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Number format change when export to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509409#M136954</link>
      <description>&lt;P&gt;I suggest that you view the .csv file with a text editor (e.g. wordpad) before and after you make the change in excel .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the difference that you notice ?&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>Thu, 01 Nov 2018 03:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509409#M136954</guid>
      <dc:creator>34reqrwe</dc:creator>
      <dc:date>2018-11-01T03:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Number format change when export to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509425#M136959</link>
      <description>&lt;P&gt;Odds are that your proc export is writing the csv text file out using that number as character.&amp;nbsp; Without seeing the raw data is hard to say.&amp;nbsp; Using Excel to "fix" things is really not a good idea, CSV is a plain text file format nothing to do with Excel.&lt;/P&gt;
&lt;P&gt;You need to explain more fully what you are doing, show example raw data:&lt;/P&gt;
&lt;P&gt;&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;&lt;/P&gt;
&lt;P&gt;I.e. we need to see formats and exact data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then show the CSV file opened using Notepad - not Excel.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 09:02:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509425#M136959</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-01T09:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Number format change when export to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509548#M136990</link>
      <description>Two possibilities.&lt;BR /&gt;1. SAS is exporting the value as a character. Check the csv file in a TEXT EDITOR, not Excel. If you see quoatation marks around the value, that's your issue. &lt;BR /&gt;&lt;BR /&gt;2. Your other software package (MT4) is not reading the data in correctly for some reason. This may have to do with the software. A csv has no forced types so the application is usually guessing and sometimes they guess wrong.</description>
      <pubDate>Thu, 01 Nov 2018 14:55:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509548#M136990</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-01T14:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Number format change when export to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509557#M136995</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/49486"&gt;@hhchenfx&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I export data to csv file. Then I load this csv file to a different software (MT4) and this software doesn't read number as numeric.&lt;/P&gt;
&lt;P&gt;I have to open the csv file, select all data and click on the number setting with Icon Comma (Comma Style) in Excel.&lt;/P&gt;
&lt;P&gt;Then save it.&lt;/P&gt;
&lt;P&gt;Now the software read everything correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS code, I try to change format of all numeric into 6.2 before export. But still not helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure you can suggest me any procedure to fix that bug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;		proc export data=Low_dot_normal
		outfile="E:\export_value.csv" replace;run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I suggest that you 1) reexport the data and 2) copy some lines from the CSV file using a plain text editor like note pat. Then paste those lines into a code box opened&amp;nbsp;using the forum's {i} icon.&lt;/P&gt;
&lt;P&gt;Then indicate which value(s) are "incorrect" by highlighting a few.&lt;/P&gt;
&lt;P&gt;BUT since you say you setting the Excel comma style as what you want&amp;nbsp;I would suggest making sure the FORMAT associated the variable(s) in question have the appropriate COMMA format assigned in SAS prior to export.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 15:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-format-change-when-export-to-csv/m-p/509557#M136995</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-01T15:05:35Z</dc:date>
    </item>
  </channel>
</rss>

