Can someone tell me the OleDB Connection line, which will be used for read-only Excel file exclusively opened by another user ?
I tried the 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 the following exception when it is opened by another 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.
NOTE:
- The Excel file is stored on a shared resource, so several users can open it.
- Supplier Used: - Microsoft.Jet.OLEDB.4.0
- Excel file type: - Worksheet MS Excel 97-2003
- File Copy NOT Allowed
source share