Help using Base SAS procedures

how to input excel macro-enabled worksheet

Posts: 67

how to input excel macro-enabled worksheet


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!

Super User
Posts: 3,260

Re: how to input excel macro-enabled worksheet

Posted in reply to michellel

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?

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation