useR
useR

Reputation: 3082

sas infile .xls (2007 excel file) with namerow and startrow

I would like to import .xls file using proc import. While i only need part of the range (A10:O47)of one of the spreadsheet ("CC"). And the header local at range (A9:O9). I am using ms excel 2007.

proc import
    out = work.testing
    datafile = "C:\User\Yin\Desktop\Book.xls"
    dbms = excelcs replace;
    sheet = "CC";
    /*range = "A10:O47";*/
    namerow = 9;
    startrow = 10;
run;

There is error msg in the log: for namerow =9;

28   proc import
29       out = work.testing
30       datafile = "C:\User\Yin\Desktop\Book.xls"
31       dbms = excelcs replace;
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
32       sheet = "CC";
33       /*range = "A10:O47";*/
34       namerow = 9;
         -------
         180
35       startrow = 10;
         --------
         180
ERROR 180-322: Statement is not valid or it is used out of proper order.

36   run;

thanks.

Upvotes: 0

Views: 1651

Answers (1)

JJFord3
JJFord3

Reputation: 1985

From documentation, "Available only for DBMS=XLS for backward compatibility"

Appears these options aren't available with excelcs.

http://support.sas.com/documentation/cdl/en/acpcref/63184/HTML/default/viewer.htm#a003103761.htm

Upvotes: 1

Related Questions