Date: Thu, 18 Aug 2011 14:57:40 -0400
Reply-To: Bolotin Yevgeniy <YBolotin@SCHOOLS.NYC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Bolotin Yevgeniy <YBolotin@SCHOOLS.NYC.GOV>
Subject: Re: SAS/Access, proc import, excel, and "file in use"
In-Reply-To: A<CAM+YpE_Y9aWkXjRvhQa-kxMHnakV+m-0eBVCN-n_orZ0tohyZA@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Libname with readonly works, thanks!
Although Søren's file-copy idea is also an interesting approach
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Joe Matise
Sent: Thursday, August 18, 2011 1:57 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS/Access, proc import, excel, and "file in use"
If you use LIBNAME instead of import, and ACCESS=READONLY, does that open it
in readonly?
-Joe
On Tue, Aug 16, 2011 at 2:12 PM, Bolotin Yevgeniy
<YBolotin@schools.nyc.gov>wrote:
> Is there a way to force SAS to open an excel file as Read Only? The
> input file is stuck as an excel spreadsheet, but anything else I can
> change.
>
>
> I have SAS/Access 9.2 and the following code
>
> proc import
> out = meta_ddt
> datafile = "&definition_table_workbook"
> dbms = xls
> replace;
> sheet = "&definition_table_worksheet";
> run;
>
>
>
> This loads up some data from an .xls spreadsheet on the network, and
> then does magic things with it.
> The problem is that other people use the same spreadsheet, and
> occasionally update it - and if someone has it open, the file is locked
> and my code doesn't work
>
|