11-04-2015 01:54 AM
11-04-2015 03:39 AM
If you open your CSV file in NOTEPAD you will see that it is perfectly OK. The problem is Excel is applying formatting to the CSV when you open it and sometimes it doesn't get it right.
You can fix the formatting in Excel by setting the data type on those columns as text. If that doesn't work then do a DATA IMPORT into Excel rather than just open the CSV and specify the data type of the long numeric columns as text.
11-04-2015 04:55 AM
Yes thats correct.
But I want a solution which we can apply in SAS code which I gave above.
So that when the CSV file is created , we will be able to see the number without exponents(original value)
Is there any possible solution which can be applied in ODS CSV or PROC REPORT?
Thanks in Advance.
11-04-2015 05:14 AM - edited 11-04-2015 05:14 AM
You cannot do that with CSV. Simple put CSV is a text based format, that when opened in Excel, is parsed and interpreted by the Excel engine in its own way - another reason why you should not be using Excel for anything! If you have to open output in Excel, then you will need to change your output format to tagsets.excelxp and add in the specific foramts which Excel should apply to each column. You can find examples of this here:
As SASKiwi has already told you, the problem is Excel, not SAS or the CSV file, it is the engine that Excel uses to read the CSV file. If you open the CSV file in anything other than Excel you will see the file is correct (assuming your export code is correct).