Can anyone tell me OleDB Connection string to be used for just reading an Excel file exclusively
opened by other user?
I tried following connection string which did not work for me:-
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Mode=Read;Extended Properties=\"Excel 8.0;HDR=YES;ReadOnly=true;\"";
This connection string throws following exception when is it opened by other user:-
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.
NOTEs:
- Excel file is kept on share so that multiple users can open it.
- Provider used:- Microsoft.Jet.OLEDB.4.0
- Excel file type:- MS Excel 97-2003 Worksheet
- Copying a file is NOT allowed