|
My asp.net application reads data from excel sheet and displays data on the grid.My application and excel sheet are on the same server.If the excel sheet is opened , for example , if excel is opened manually by any users, and if the application trys to read data , the application will show an error message. The error message is as follows,
"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."
If i set the prorperty of the excel file readonly and even if it is opened by some other users , my application works fine . If i reset the property of excel file then my application will show the error again.
Connection string i am using is ,
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\\wwwroot\EBPWebAppn\EBPReport\\girish\x1_web_output.xls;Extended Properties="Excel 8.0;HDR=Yes;ReadOnly= true "
|