hello
I have a code that copies the table but with the wrong formatting, how can I copy the table with the original formatting? I tried to put ".NumberFormat = "@" "but it gives an error
Dim driver As Selenium.ChromeDriver
Dim table As WebElement
Dim destSheet As Worksheet
Set destSheet = ActiveSheet
Set driver = New Selenium.ChromeDriver
With driver
.Start
.Get "https://www2.bmf.com.br/pages/porta...regao-ptBR.asp?Data=02/01/2023&Mercadoria=DOL"
End With
Set table = driver.FindElementById("MercadoFut0").FindElementByTag("table")
table.AsTable.ToExcel destSheet.range("A2")
Set table = driver.FindElementById("MercadoFut1").FindElementByTag("table")
table.AsTable.ToExcel destSheet.range("B2").NumberFormat = "@"
Set table = driver.FindElementById("MercadoFut2").FindElementByTag("table")
table.AsTable.ToExcel destSheet.range("G2").NumberFormat = "@"
I have a code that copies the table but with the wrong formatting, how can I copy the table with the original formatting? I tried to put ".NumberFormat = "@" "but it gives an error
Dim driver As Selenium.ChromeDriver
Dim table As WebElement
Dim destSheet As Worksheet
Set destSheet = ActiveSheet
Set driver = New Selenium.ChromeDriver
With driver
.Start
.Get "https://www2.bmf.com.br/pages/porta...regao-ptBR.asp?Data=02/01/2023&Mercadoria=DOL"
End With
Set table = driver.FindElementById("MercadoFut0").FindElementByTag("table")
table.AsTable.ToExcel destSheet.range("A2")
Set table = driver.FindElementById("MercadoFut1").FindElementByTag("table")
table.AsTable.ToExcel destSheet.range("B2").NumberFormat = "@"
Set table = driver.FindElementById("MercadoFut2").FindElementByTag("table")
table.AsTable.ToExcel destSheet.range("G2").NumberFormat = "@"