rjhilliard
Programmer
I am trying to open a connection to an excel spreadsheet that resides on a network using classic asp.
I have had success connecting locally but I must not be entering the correct parameters for a network connect.
Here is my code:
objConn2.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\server name\root directory\subdirectory\subdirectory\spreadsheet.xls;""Extended Properties=Excel 8.0;HDR=Yes"""
I have also tried...
objConn2.ConnectionString="Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" & Server.mappath("/"&"spreadsheet.xls") & ";UID=admin;"
also tried this...
objConn2.ConnectionString="Driver={Microsoft Excel Driver (*.xls)};DriverId=790;DBQ=\\server name\root directory\subdirectory\subdirectory\spreadsheet.xls;DefaultDir=\\server name\root directory\subdirectory\subdirectory\
I tried supplanting the ip address for server name without luck.
I am currently receiving this error...
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Excel Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x900 Thread 0x268 DBC 0x10dbf04 Excel'.
Any help would be appreciated.
I have had success connecting locally but I must not be entering the correct parameters for a network connect.
Here is my code:
objConn2.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\server name\root directory\subdirectory\subdirectory\spreadsheet.xls;""Extended Properties=Excel 8.0;HDR=Yes"""
I have also tried...
objConn2.ConnectionString="Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" & Server.mappath("/"&"spreadsheet.xls") & ";UID=admin;"
also tried this...
objConn2.ConnectionString="Driver={Microsoft Excel Driver (*.xls)};DriverId=790;DBQ=\\server name\root directory\subdirectory\subdirectory\spreadsheet.xls;DefaultDir=\\server name\root directory\subdirectory\subdirectory\
I tried supplanting the ip address for server name without luck.
I am currently receiving this error...
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Excel Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x900 Thread 0x268 DBC 0x10dbf04 Excel'.
Any help would be appreciated.