0

I'm having trouble getting OLEDB for Excel to work in read-only mode. The document is usually accessed by another user, and I'd like to import its contents to SAS without needing to tell other users to close down Excel first.

This is what I have right now, which is NOT opening the document in readonly mode.

libname oledbxls oledb ACCESS=READONLY provider="Microsoft.Jet.OLEDB.4.0"
properties=("data source"="&xlsfile." "Mode"="Read")
provider_string="Excel 8.0;ReadOnly=True;HDR=no;IMEX=1;"
;

This is the error I get:

ERROR: Error trying to establish connection: 
Unable to Initialize: The Microsoft
Jet database engine cannot open the file ''.  
It is already opened exclusively by another user,
or you need permission to view its data.

ERROR: Error in the LIBNAME statement.

Everything works fine unless someone has the document opened in Excel. Any advice is greatly appreciated.

flag

Your Answer

Browse other questions tagged or ask your own question.