07-23-2015 02:22 PM
I have a question about input excel macro-enabled worksheet into SAS. My problem is for columns created in spreadsheet by VBA, they only show the first digit of numbers in SAS. For example, if it is 57 in spreadsheet, it will be shown as 5 in SAS after input them into SAS.
I did the following steps.
Firstly, when I try to save it as CSV (Comma delimited) file, Excel popped out a window saying the csv file may contain features that are not compatible with CSV. Do you want to keep the workbook in this format? I clicked Yes to saved it as CSV file.
Secondly, I input this CSV file into SAS, but for two variables created in EXCEL by VBA, it only shows the first digit of the number as I said above.
proc import datafile="C:\....\abc.csv"
Could you give me some hint how to solve this problem. Thanks so much!
07-23-2015 03:28 PM
Have a look at the CSV file in a text editor like Notepad. What does it show for the column being truncated? Is it showing correctly and what is the format for it?