Uma família de softwares de planilhas da Microsoft com ferramentas para analisar, criar gráficos e comunicar dados.
segue cod.
'Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub xml2()
Columns("B:B").Select
Selection.ClearContents
Range("B1").Select
ActiveCell.FormulaR1C1 = "Cod: Agen. por"
'' Range("C1").Select
'' ActiveCell.FormulaR1C1 = "Comfir."
' Range("D1").Select
' ActiveCell.FormulaR1C1 = "??"
' Range("E1").Select
' ActiveCell.FormulaR1C1 = "Comfir."
Range("A1").Select
Range("L6:M8").Select
ActiveCell.FormulaR1C1 = "Buscando ..."
Range("L6:M8").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent2
.TintAndShade = 0.399975585192419
.PatternTintAndShade = 0
End With
Selection.Font.Bold = True
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent1
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
Dim IeI As InternetExplorer
Dim elemCollection As Object
Dim obj As Object
Dim LNIL, linha, lh, i As Long
Dim gpon, dvr, dvr2, sip, tdm, vdsl, adsl, Upgrade, levocidade, pontos As Variant
Dim alt, tags, cabeamento, modemm, trocamodem, up, cinco, dez, vinte, trinta, cinquenta, cem, Desconectar, Adicionar, Ativo As String
Dim enc As String
Set IeI = CreateObject("InternetExplorer.Application")
With IeI
.navigate "http://appwfm.gvt.net.br/wfm-search/rs/v2/workorder/8-47438241256-1"
Do While .Busy Or .readyState <> 4
DoEvents
Loop
For w = 2 To WorksheetFunction.CountA(ThisWorkbook.Worksheets("Ordens").Columns(1))
Worksheets("Ordens").Cells(w, 5).Value = "*"
ordem = Split(Worksheets("Ordens").Cells(w, 1).Value, ":", -1)
.navigate "http://appwfm.gvt.net.br/wfm-search/rs/v2/workorder/" & ordem(0)
.Visible = True
Do While .Busy Or .readyState <> 4
DoEvents
Loop
'
'
' Sleep 500
' MyWaitMacro (1)
' MsgBox .document.activeElement.innerText
' MyWaitMacro (1)
' tags = Replace(Replace(Replace(.Document.activeElement.innerText, ">", ""), "</", ""), "<", "")
' tags = Replace(tags, "-", "")
tags = .Document.activeElement.innerText
tags = Replace(tags, vbCrLf, "")
tags = Replace(tags, "Power ", "")
'********************************************* obs de injeçao
dia = Left(Worksheets("Ordens").Cells(w, 18).Value, 6) & "2019"
voz = "*<scheduledBy>GPS_1</scheduledBy>*"
Compara = tags Like voz
If Compara Then
Worksheets("Ordens").Cells(w, 2).Value = voz
End If
mat = Null
Next w
End With
Range("L6:M8").Select
ActiveCell.FormulaR1C1 = "FIM"
Range("L6:M8").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 192
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("F9").Select
End Sub