Reputation: 43
I have spreadsheets with columns of mixed data types ie:
Column1
13450
67/89
823ad
I want SAS to read all entries so it discovers the data is mixed and so imports it all as character format (otherwise it can define as numeric and so creates missing entries for non-numeric values). So I need to use the 'GUESSINGROWS' feature of PROC IMPORT.
I was able to do this with .XLS files as so:
PROC IMPORT OUT=importeddata
DATAFILE = "C:\User\Example\Excel File.xls"
DBMS=XLS REPLACE;
SHEET='Input';
GETNAMES=YES;
MIXED=YES;
GUESSINGROWS=32767;
RUN;
However, these files are now being saved as .XLSM files and so I need to use the new DBMS of EXCEL. When doing this, GUESSINGROWS is no longer a valid statement.
Does anyone know how I can use the GUESSINGROWS statement while importing from a .xlsm file? Or another way to define the input variable format when importing from .xlsm?
Upvotes: 2
Views: 7960
Reputation: 21274
https://communities.sas.com/message/193134#193134
The response from Art on Jan 8, 2014 is what you're looking for, change your type to CHAR instead of Date and the column name to the correct column name.
Upvotes: 1