#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Web

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 118
Default Web

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Web

You may not need enable the view button. I think you want the link location
which is probably in the href property. You can then take the URL from the
href property to get the object. You may want to open a 2nd IE explorer and
put the URL obtained from the href into the 2nd IE so you still can go back
to the original URL without having to naviage back to the 1st URL.

"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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Web

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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Web

Once you find the row, the columns are under the cells property.

"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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Web

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


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Web

Hey Joel,

I was using break mode & checking each code. for that reason
it was not enabled i guess.

Now just now tested without putting any break, view button enabled.

Thanks joel.

Joel, How do i check how many rows are available in a table ?



On Oct 8, 9:07*pm, Joel wrote:
You may not need enable the view button. *I think you want the link location
which is probably in the href property. *You can then take the URL from the
href property to get the object. *You may want to open a 2nd IE explorer and
put the URL obtained from the href into the 2nd IE so you still can go back
to the original URL without having to naviage back to the 1st URL.

"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.


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Web

the length property

NumRows = doc_tables(1).rows.length

"fi.or.jp.de" wrote:

Hey Joel,

I was using break mode & checking each code. for that reason
it was not enabled i guess.

Now just now tested without putting any break, view button enabled.

Thanks joel.

Joel, How do i check how many rows are available in a table ?



On Oct 8, 9:07 pm, Joel wrote:
You may not need enable the view button. I think you want the link location
which is probably in the href property. You can then take the URL from the
href property to get the object. You may want to open a 2nd IE explorer and
put the URL obtained from the href into the 2nd IE so you still can go back
to the original URL without having to naviage back to the 1st URL.

"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.



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Web

Joel, thank you

is there any option in coding when ever the table is been copied,
as usual it paste in excel. I want another copy in Text.txt format. ?

On Oct 8, 10:30*pm, Joel wrote:
the length property

NumRows = doc_tables(1).rows.length

"fi.or.jp.de" wrote:
Hey Joel,


I was using break mode & checking each code. for that reason
it was not enabled i guess.


Now just now tested without putting any break, view button enabled.


Thanks joel.


Joel, How do i check how many rows are available in a table ?


On Oct 8, 9:07 pm, Joel wrote:
You may not need enable the view button. *I think you want the link location
which is probably in the href property. *You can then take the URL from the
href property to get the object. *You may want to open a 2nd IE explorer and
put the URL obtained from the href into the 2nd IE so you still can go back
to the original URL without having to naviage back to the 1st URL.


"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.




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Web

the easiest way is to make a copy of the worksheet and save as text.

'copy active sheet to new workbook
'copy without before or after creates new workbook
ActiveSheet.Copy
Set Newbk = ActiveWorkbook
Newbk.SaveAs _
Filename:="C:\TEMP\Book2.txt", _
FileFormat:=xlTextMSDOS
Newbk.Close savechanges:=False

"fi.or.jp.de" wrote:

Joel, thank you

is there any option in coding when ever the table is been copied,
as usual it paste in excel. I want another copy in Text.txt format. ?

On Oct 8, 10:30 pm, Joel wrote:
the length property

NumRows = doc_tables(1).rows.length

"fi.or.jp.de" wrote:
Hey Joel,


I was using break mode & checking each code. for that reason
it was not enabled i guess.


Now just now tested without putting any break, view button enabled.


Thanks joel.


Joel, How do i check how many rows are available in a table ?


On Oct 8, 9:07 pm, Joel wrote:
You may not need enable the view button. I think you want the link location
which is probably in the href property. You can then take the URL from the
href property to get the object. You may want to open a 2nd IE explorer and
put the URL obtained from the href into the 2nd IE so you still can go back
to the original URL without having to naviage back to the 1st URL.


"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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"