sawebs
asked on
Excel ADO Connection to file on Sharepoint site
I have created an Excel file that runs a SQL query on several sheets within the same file. This works fine when the file is saved on the user's PC or in the network folder. However if they save it onto Sharepoint, it stops at the point the connection is being opened saying "Invalid internet address". I have tried adapting my code to look the same as the URL which works when pasted into IE but this gives the same error. Can anyone help please?
If Left(strWbPath1, 4) = "http" Then
strWbPath1 = Replace(strWbPath1, " ", Chr(37) & "20")
Else
End If
cn1.Open "Provider=Microsoft.ACE.OL EDB.12.0;D ata Source=" & strWbPath1 & ";Extended Properties=""Excel 12.0 Macro;HDR=YES;IMEX=1"";"
If Left(strWbPath1, 4) = "http" Then
strWbPath1 = Replace(strWbPath1, " ", Chr(37) & "20")
Else
End If
cn1.Open "Provider=Microsoft.ACE.OL
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.