Search code examples
importsasxlsx

Whether xlsx engine in SAS scan all the rows to get variables'length?


Whether PROC IMPORT using xlsx engine in SAS scans all rows to get variables' length? I have a whitepaper documented that xlsx engine will scan all the row to get datatype but no paper so far confirm that SAS will also scan all rows to get variables' length.

enter image description here


Solution

  • I would say that is the definitive answer on the subject, as Vince DelGobbo is the resident expert at SAS Institute on working with Excel. I don't know if he personally wrote the XLSX engine or not, but he certainly knows those things inside and out. So we can trust him here - and if it's scanning datatype, it's also scanning length (as that's part of data type).

    However, this is trivially verifiable, and I did so - excel file with '1 in every row in column A except the last row (2**20) with a 240-character long string in it.

    PROC IMPORT returned a 240 long column, no truncation issues.