Web
Use for each
for each Myrow in doc_tables(1).rows
for each cell in Myrows.Cells
ACell = cell.innertext
next cell
next Myrow
ACell = doc_tables(1).Rows(i).Cells(j).innerText
"fi.or.jp.de" wrote:
Sorry ron, i got it.
I didn't tested the second code you have given, just now tested works
fine.
I used like this, thank you very much ron....
Set Shtn = Sheets("sheet2")
Set doc_tables = ie.Document.getElementsByTagName("table")
For i = 1 To 15
For j = 1 To 3
ACell = doc_tables(1).Rows(i).Cells(j).innerText
Shtn.Cells(i, j) = ACell
Next j
Next i
one more, How do i check how many rows are available in a table ?
And "View" button still disabled i don't know why ? even after check
box checked.
On Oct 8, 9:48 pm, "fi.or.jp.de" wrote:
Ron, absolutely fine.
I am able get the table data into excel sheet.
I have tested for single row, which contains 3 tabs.
all the tabs data came in a single cell. how can i make it to
different columns.
Joel,
I didn't find href property
source code
<li class="pageButtons" id="summary_view_list"
<input class="buttonDefaultDisabled" type="button"
id="summary_view_button" name="html_but_view" disabled="disabled"
value=" View " title="View" onclick="submitNewAction
(document.html_form_list,'InstitutionAccount');"/
</li
On Oct 8, 8:12 pm, ron wrote:
On Oct 8, 8:47 am, "fi.or.jp.de" wrote:
Hi All,
I have table in web page with check box for each row.
And there is one option called "view", it is been disabled.
When i manually click the check boxes "view" button enables but when i
do
it on Excel Vba its not enabled.
check box code ..
For Each itm In ie.Document.getElementsByName("html_ckb_list")
itm.Checked = True
Next itm
How Can i enable "view" button ?
And also i need to copy the table to excel sheet ?
How can i achieve this.
I need to login web page and need to go for some other tabs to grab
this info.
So, I didn't mentioned the web address.
I know without web address it is difficult but any small clues will
help me more. i will try
for the rest, just give me hints to enable button and copy table
contents.
Thanks in advance.
There are a couple of ways to check a check box, maybe one of the
other ways will better simulate manually clicking the box. Check the
source code for the name of the check box you want to select and then
try
ie.document.all.Item("chk_box_name").Click
or
check_bx = ie.document.all.Item("chk_box_name").Checked
As for copying the table try the following
Set doc_tables = ie.document.getElementsByTagname("table")
ActiveCell = doc_tables(0).innertext
If there is more than one table you'll have to find the correct
(number) for the table you want. Also, if you just want part of the
table try the following constructions
To capture a row
ActiveCell = doc_tables(0).Rows(5).innertext
To capture part of a row
ActiveCell = doc_tables(0).Rows(5).Cells(5).innertext
Hope this helps...Ron
|