无法使用oledb打开XLS文件

时间:2011-10-05 08:11:55

标签: c# excel oledb

当我尝试打开xls文件时,出现此错误:

Rhe Microsoft Office Access database engine cannot open or write to the file ''. 
It is already opened exclusively by another user, or you need permission to view and write its data.

我做了几次访问,但我关闭并一直处理连接。它在我的DEV PC上。在服务器上我收到此错误:没有对文件的读/写访问权限。此文件位于\ networkdisk \ directory1 \ Files

我将使用“ACE.OLEDB”,因为Jet未在x64服务器上运行。

有什么想法吗?

谢谢,

2 个答案:

答案 0 :(得分:1)

在我的情况下,它是一个尚未关闭的文件流。

答案 1 :(得分:0)

在我们的案例中,客户端上传了受密码保护的Excel文件