Private Sub CommandButton1_Click()
Dim rs As ADODB.Recordset
Set Cnx = New ADODB.Connection
req = "select * from liste1"
file = "https://sharepoint.com/:s:/n/Files.aspx?filesrc=%356236464785&file=Fichier20test.xls%4hgR"
file = "https://sharepoint.com/:s:/n/Files.aspx?filesrc=%356236464785&file=Fichier20test.xls%4hgR"
file = Replace(Replace(Replace(file, "/", "\"), " ", "%20"), "http:", "")
With Cnx
.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=2;RetrieveIds=Yes;DATABASE=file;Extended Properties=""Excel 12.0;HDR=YES;"""
End With
Cnx.Open
If Cnx.State = adStateOpen Then
Set rs = Cnx.Execute(req)
End If
End Sub