LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 26 Nov 2006 10:22:56 -0800
Reply-To:     Paul <vanwamelen@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Paul <vanwamelen@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: copy external file
Comments: To: sas-l@uga.edu
In-Reply-To:  <200611260017.kAPBkAnj001156@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Two things: 1) I have a particular excel file that, indeed, does get read by proc import whether I have it open or not, but if I have it open at least one of the columns don't get recognized as numeric. It's a bit weird but it does happen consistently. Also everything I've found on proc import of excel files warn that the file should not be open in excel. I've also had reports from other people that if someone else has the file open proc import fails. I have no first hand experience of this though. 2) I found I way to cleanly copy the file: systask command "copy &filename &tmpfilename" wait;

Thanks for your time!

Paul

Arthur Tabachneck wrote: > Paul, > > Please provide more details regarding what you are trying to accomplish > and why you haven't been successful. > > I ran the following two procs with the user (me) having already opened the > spreadsheet in Excel: > > PROC IMPORT OUT= WORK.TEST1 > DATAFILE= "c:\sample.xls" > DBMS=EXCEL2000 REPLACE; > GETNAMES=YES; > RUN; > PROC IMPORT OUT= WORK.TEST2 > DATAFILE= "c:\sample.xls" > DBMS=EXCEL2000 REPLACE; > GETNAMES=YES; > RUN; > > Even with c:\sample.xls open in Excel, both proc imports worked. > > Art > ------------- > On Sat, 25 Nov 2006 14:35:30 -0800, Paul <vanwamelen@GMAIL.COM> wrote: > > >Is there a way to make a copy of an external files from SAS (without > >using SYSTEM or X)? > > > >I want to "proc import" an excel file even if the user already has it > >open. The idea is to first copy it to C:\temp (OK not very portable...) > >and then "proc import" the copy. I can do it with "system" and the > >noxwait option, but that pops up that ugly window, very distracting. I > >see I can do things like > > rc=rename('d:\temp','d:\testfile','file'); > >but is there an equivalent for "copy"? I can't find it anywhere! > > > >Any help would be greatly appreciated! > > > >Paul


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