Hi, I need to read in SAS a Excel sheet where one column has mixed-type data numeric and text, with the text data appearing after many rows: NUM EXTERNAL VISIT 1 1 2 3 3 4 5 5 …… more rows, in a similar fashion 130 FU1 131 FU2 132 EOT As probably everyone knows by now, PROC IMPORT fails here – we get in SAS a column EXTERNAL_VISIT of numeric data and the text values are lost. I know that: This is due to SAS scanning a fixed number of records to assess the type, and that this number is rather small. The number can be made larger by changing a parameter in the Windows registry, but this is not allowed. Saving the Excel file as CSV and importing that into SAS, enables using the option GUESSINGROWS to force scanning more records but my process does not allow this. I tried using LIBNAME engine, in 2 ways. Both ran error-free, with the same output – column of numeric data and text values lost. I read several sources, including the SUGI 32 source https://support.sas.com/resources/papers/proceedings/proceedings/sugi31/024-31.pdf “De-Mystifying the SAS® LIBNAME Engine in Microsoft Excel: A Practical Guide”(section “ACCESSING DATA FROM A SPREADSHEET” ) “Note the libname option “MIXED=YES” is used to read mixed character and numeric data as character data. LIBNAME WrkBk EXCEL 'My Workbook.xls' MIXED=YES; data test; set WrkBk.'Sheet_name$'n; run; LIBNAME WrkBk EXCEL 'My Workbook.xls'; data test; set WrkBk.'Sheet_name$'n (dbsastype=('EXTERNAL VISIT'=char10) ) ; run; Does anyone know if LIBNAME engine also scans just a limited number of records? If so, can this number be set in the code? As I said, I can’t update the Windows registry. Does anyone have any other ideas or thoughts? I would appreciate any help, Yael
... View more