Hello
I am importing a table from Excel 2010 using SAS 9.2. This has never been a problem before but now SAS isn't importing all columns. The table is from A1 to OQ366 and SAS only imports to IU366. I even forced the range by using the worksheet and name in the import syntax i.e.
"ImportFile$A1:OQ366". For another table that is A1 to NB366 it only imports to MH366.
Is there a specified limit to the number of columns imported? Is there any way I can force the import? Thanks.
I can only test it on 9.3. The following worked for me on a 64-bit Windows 2008 server:
%let import_path=d:\art\widetest.xlsx;
Proc IMPORT OUT= WORK.MASTER_NEW_B1
DATAFILE= "&import_path"
DBMS=XLSX REPLACE;
getnames=no;
run;
Post the code that you used. Column IU, which I think is column 255, makes me think that you are attempting to import using one of the older engines. Are you running base SAS or are you using EG? Do you license SAS/Access for pcfile formats?
I believe the ACE library (a Microsoft product) which is the interface used by SAS to access Excel and Access files is still limited to 255 column on import and export.
PG
Hi
The code I used to import is:
Proc IMPORT OUT= WORK.MASTER_NEW_B1
DATAFILE= &import_path
DBMS=EXCELCS REPLACE;
Range = "B1$";
Scantext = Yes;
UseDate = Yes;
run;
Note that B1 is the name of the worksheet. So is there any way to get around the import column limit?
Thanks.
Shelley
I can only test it on 9.3. The following worked for me on a 64-bit Windows 2008 server:
%let import_path=d:\art\widetest.xlsx;
Proc IMPORT OUT= WORK.MASTER_NEW_B1
DATAFILE= "&import_path"
DBMS=XLSX REPLACE;
getnames=no;
run;
Hi Arthur
Thanks so much....I don't know why I said I had 9.2 because I do have 9.3!! I'm assuming the "getnames" is for the column head labels?
Yes. If you have column head labels then use getnames=yes;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.