谁能告诉我 OleDB 连接字符串仅用于读取exclusively
其他用户打开的 Excel 文件?
我尝试了以下对我不起作用的连接字符串:-
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Mode=Read;Extended Properties=\"Excel 8.0;HDR=YES;ReadOnly=true;\"";
此连接字符串在被其他用户打开时会引发以下异常:-
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.
笔记:
- Excel 文件保持共享,以便多个用户可以打开它。
- 使用的提供商:- Microsoft.Jet.OLEDB.4.0
- Excel 文件类型:- MS Excel 97-2003 工作表
- 不允许复制文件