1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Dim IE As Object, NomURL, NomExtHtml, NomHtml, Lig
Sub Importation_Fichiers_csv()
n = 0: Nl = 0: Columns(1).ClearContents: Columns(2).ClearContents
NomURL = "https://help.shopify.com/fr/manual/customers/import-export-customers#mod-le-csv-client"
Destination = "C:\Temp_FichCSV"
NomExtHtml = ".csv"
Set IE = CreateObject("internetexplorer.application")
IE.Top = 20: IE.Height = 1000: IE.Left = 50: IE.Width = 700
IE.Navigate (NomURL): IE.Visible = True: Do: DoEvents: Loop Until IE.readyState = 4
IE.document.Body.Style.Zoom = 1
For Each Lig In IE.document.getElementsByTagName("a")
n = n + 1: ' If InStr(Lig, ".csv") <> 0 Then MsgBox Lig
If Len(Lig) > Len(NomHtml) + Len(NomExtHtml) + 1 _
And Left(Lig, Len(NomHtml)) = NomHtml _
And Right(Lig, Len(NomExtHtml)) = NomExtHtml Then
Nl = Nl + 1: Cells(Nl, 1) = Lig.className: Cells(Nl, 2) = Lig
Set bouton = Lig ' IE.document.all("/csv/product_template.csv")
bouton.Click
'@@@@@
MsgBox "A ce niveau, comment mettre le fichier CSV dans=> " & Destination & " ???":Stop
End If
Next
IE.Quit
End Sub |
Partager