I have this code:
which works fine. I have copied the .xls-file to my project folder and tries this code:Code:Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\unzipped\exceldotnet[1]\exceltest.xls;" & _ "Extended Properties=Excel 8.0;"
But then I receive an error saying:Code:Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & server.mappath("exceltest.xls") & ";" & _ "Extended Properties=Excel 8.0;"
What's wrong, can't I use the server.mappath?Code: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.




Reply With Quote