Here is the html code of my html table:
<table cellspacing="0" cellpadding="4" width="100%" border="1" id="data">
<thead style="display: table-header-group;">
<tr>
<th width="10%" align="center"><b> VIN </b></th>
<th width="10%" align="center"><b> CURRENT CKPNT </b></th>...
Dditionally to the condition: If Not IsEmpty(objExcel.Cells(RowIndex, 1)) Then
I want to add if objExcel.Rows.Count <> 1 then
i.e. if the number of rows of the table is different from 1.
Thanks
Sub ExtractDataFromHtml()
Dim objExcel As Worksheet
Dim objIE As SHDocVw.InternetExplorer
Dim varTables, varTable
Dim varRows, varRow
Dim varCells, varCell
Dim lngRow As Integer
Dim lngColumn As Integer
Dim strBuffer
Dim VINS
Dim URL As String
Dim count As Integer
Dim...
Hello every body,
I want to read out the number of ros of an html table.
table.Rows.Count doesn't work!
Is there any special expression to do that??
Thank you very much!
Thank you so much for your reply.
I'm sorry, but this doesn't work. lngRow is initialized to 2, and in your loop, you check if lngRow =3, and this will never be the case, since lngRow has not been incremented.
I think lngRow is the number of the row, not of the source html table, but of the...
Hey y'all,
I'm a little vba beginner, and want to read out the content of a table from an HTML page, and copy only the cells of the second row to excel.
I searched for long time in google, and finally I could write the following code. This script allows me to copy ALL rows, but I need only the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.