Excel e gli applicativi Microsoft Office prendere dati da tabella web

Login Registrati
Stai vedendo 3 articoli - dal 1 a 3 (di 3 totali)
  • Autore
    Articoli
  • #51850 Score: 0 | Risposta

    sal

      https://www.totoproject.com/giochi/lotto_stat_u50.asp

      non ho idea su come prendere titoli e dati dalla tabella web.

      Grazie a chi mi aiuta.

       

      #51858 Score: 0 | Risposta

      vecchio frac
      Senior Moderator
        272 pts

        Con Excel 365: dal menu Dati, gruppo Recupera e trasforma dati, pulsante Da Web, poi qui segui la procedura guidata per indicare il sito, scegliere l'accesso anonimo e infine selezionare la "tabella 3", che contiene i dati.

        #53221 Score: 0 | Risposta

        LukeReds
        Partecipante
          19 pts

          ciao,

          altro sistema con vba. 

          `Sub Lotto()
          Dim http As Object, tbl As Object, url As String, tabella As Object
          Dim riga As Object, cella As Object, r As Long, c As Long
          Range("A1:M51").Clear
          url = "https://www.totoproject.com/giochi/lotto_stat_u50.asp"
          Set dati = CreateObject("MSXML2.XMLHTTP")
          dati.Open "GET", url, False
          dati.Send
          Set tbl = CreateObject("htmlfile")
          tbl.body.innerHTML = dati.responseText
          Set tabella = tbl.getElementsByTagName("table")(3)
          If Not tabella Is Nothing Then
              r = 1
              For Each riga In tabella.Rows
                  c = 1
                  For Each cella In riga.Cells
                      Cells(r, c) = cella.innerText
                      c = c + 1
                  Next cella
                  r = r + 1
              Next riga
          Else: MsgBox "Tabella non trovata"
          End If
          End Sub`
        Login Registrati
        Stai vedendo 3 articoli - dal 1 a 3 (di 3 totali)
        Rispondi a: prendere dati da tabella web
        Gli allegati sono permessi solo ad utenti REGISTRATI
        Le tue informazioni: