08-13-2012 03:59 PM
I have a Excel file named ALL, and sheet named SHEET1.
Not like using proc import ,,,when I use libname to connect excel file to SAS such as:
libname xl Excel "C:\Temp\ALL.xls"; I can get a SAS dataset xl.SHEET1.
BUT if the first 8 obs of a column is empty, then this column will be set to length $1. and all the numeric value of this column will be set to empty.
So if I still want to use libname I have to set a value in the first 8 obs.
Please give me some suggestion on it!
08-13-2012 04:16 PM
This is a bit messy, but fortunately, you will have to do this only once. The problem lies with the number of lines that Excel scans to determine the properties of columns. You must change the TypeGuessRows entry in Windows registry. This is described on page 36 of the document :
08-13-2012 04:32 PM
but I don't have the permit to change the computer's setting,,,,,,so what I can do only is add an extra row on the top to define the columns' properties?
08-13-2012 06:04 PM
Bt default, Excel scans only the first 8 lines of a table to determine the column properties. So, yes, putting your longest possible string within the first 8 lines will do the trick. - PG