Hi, I have used the import procedure to create SAS dataset from excel workbook (.xlsx) file in UNIX. The issue i have is, all the character values in the dataset are assigned to the length of the maximum value in that particular variable. (Values with leading spaces. For. Eg. if the maximum length of variable value is 60, the value such as "ELDER" in same variable is also assigned to length of 60 which should have the length as 5). I tried all possible character functions to remove the leading spaces from the value however it din't work. I tried to reverse the string and used substr function, this worked but few values had numbers in between the text so that was not giving me an appropriate answer. Is there something i am missing in import procedure? Below is the sample code i have used to import the XLSX file. proc import datafile="test.xlsx" out=tst dbms=xlsx replace; getnames=yes; range="Values$B2:K34"; run; The only solution i have is to convert the xlsx file to CSV and import the same but I just need to know the solution for XLSX file? regards, SPP
... View more