LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 18 Feb 2009 18:49:23 -0500
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: proc import
Comments: To: Akshaya Nathilvar <akshaya.nathilvar@GMAIL.COM>

AkshayA,

I think the datarow statement is only applicable to delimited files and the undocumented xls engine. Regardless, it doesn't correctly handle cases where the data are on, say, row 4, while the data begin at row 5, as in the OP's specs.

Regarding my proposed solution, the OP wrote me offline, indicating concern about receiving a SAS warning in the log concerning possible conflicts between ranges and sheet names. I hadn't suggested a sheet= in my proposed solution but, of course, many of us encounter Excel workbooks that contain multiple sheets.

The only way I could figure out to get around the warning, at least without simply disabling it, was to propose including the sheet name within the range. E.g.,

PROC IMPORT OUT= WORK.TEST DATAFILE= "k:\book1.xls" DBMS=EXCEL2000 REPLACE; range="Sheet1$A4:Z64000"; getnames=yes; RUN;

Art ------- On Wed, 18 Feb 2009 14:18:09 -0500, Akshaya Nathilvar <akshaya.nathilvar@GMAIL.COM> wrote:

>You can also use DATAROW statement, but it really depends how you are >getting the variable names from Excel spreadsheet. > DATAROW=5; > >AkshayA! > >On Tue, Feb 17, 2009 at 9:52 AM, Arthur Tabachneck <art297@netscape.net>wrote: > >> Venkatesh, >> >> If you license sas/access to pc files, you could use something like: >> >> PROC IMPORT OUT= WORK.TEST >> DATAFILE= "c:\book1.xls" >> DBMS=EXCEL2000 REPLACE; >> range="A4:Z64000"; >> getnames=yes; >> RUN; >> >> HTH, >> Art >> ------ >> On Tue, 17 Feb 2009 08:36:47 -0500, Venkatesh K >> <venkatesh.kadiyala@GMAIL.COM> wrote: >> >> >how to import data the from excel sheet,obsservations starts from fivth >> line >> >and the variable are in fourth line ? >> > > > >-- >AkshayA!


Back to: Top of message | Previous page | Main SAS-L page