Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub limpiarCodigo(contenidoweb As String)
- Dim a As Integer
- Dim lineas As String[]
- Dim id As String
- Dim nombre As String
- Dim puntos As String
- Dim pais As String
- contenidoweb = Replace$(contenidoweb, "<br>", "")
- contenidoweb = Replace$(contenidoweb, "<tr>", "")
- contenidoweb = Replace$(contenidoweb, "</tr>", "")
- contenidoweb = Replace$(contenidoweb, "<td>", "")
- contenidoweb = Replace$(contenidoweb, "</td>", "")
- contenidoweb = Replace$(contenidoweb, "<th>", "")
- contenidoweb = Replace$(contenidoweb, "</th>", "")
- contenidoweb = Replace$(contenidoweb, "<table>", "")
- contenidoweb = Replace$(contenidoweb, "</table>", "")
- lineas = Split(contenidoweb, "\n\t", "", True)
- For a = 0 To lineas.Max
- lineas[a] = Trim(lineas[a])
- Next
- lineas.Join("\n")
- lineas = Split(contenidoweb, "\n\t", "", True)
- If lineas[0] = "Connected successfully" Then
- GridView1.rows.count = 0 'limpiamos el gridviews
- For a = 1 To lineas.max Step 4
- id = lineas[a]
- nombre = lineas[a + 1]
- pais = lineas[a + 2]
- puntos = lineas[a + 3]
- rellenagridview(id, nombre, pais, puntos)
- Next
- Else
- Message.Error("No ha sido posible leer el marcador online")
- Endif
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement