Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to view specyfied table in IE ,using qm ?
#1
Hello

is this posible to view olny that TABLE what i want , using IE ?

like in excel :

Sub table()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.quickmacros.com/history.html", Destination:=Range("A1"))

.WebTables = "2"

.Refresh BackgroundQuery:=False
End With
End Sub


WebTables ="XXX " - is the number of selected teble

Q: How to view that using QM ?

thanks for answer Smile
#2
Easiest is when you already have whole page displayed in IE. Then you can simply replace BODY inner html to TABLE html.

Code:
Copy      Help
int w1=win("Quick Macros :: View topic")
MSHTML.IHTMLElement table=htm("TABLE" "" "" w1 0 5 0x20)
MSHTML.IHTMLElement body=htm("BODY" "" "" w1 0 0 0x20)
body.innerHTML=table.outerHTML
#3
Could you explain me prametrs , whats they do/change ?

MSHTML.IHTMLElement table=htm("TABLE" "" "" w1 0 5 0x20)
MSHTML.IHTMLElement body=htm("BODY" "" "" w1 0 0 0x20)

("TABLE" "" "" w1 0 5 0x20) ?
("BODY" "" "" w1 0 0 0x20) ?

"" - ?
"" - ?
w1 - ?
0 - ?
5 - it's number of table i think
0x20 - ?




oh, and can i specyfy even row and cell ?

thanks , very much Gintaras (do planing linux version of QM ?)
#4
Parameters are explained in QM Help. Click htm and press F1. To insert these two statements I used the Find Html Element dialog. Here table is specified by its index (5) in internal collection of tables (0 - based), and therefore text and html are "", but you can also specify partial text or html if you want (you can use wildcards). Here w1 is IE window handle.

Of course you can use rows (TR) and cells (TD) too.

I am not planning QM for Linux.
#5
I's work fine , also with TD , and TR ,but i wonder is there way to view html code after qm make "filtration" , when i try to save page, html code is this same as orginal ; viewing page source does't work to... Sad Where it is keeped ... memory ?


and how to hide specyfy table ? (not view hide table )

thanks very much for answer
#6
View and possibly save html.

Code:
Copy      Help
;...
MSHTML.IHTMLDocument3 doc3=body.document
str allhtml=doc3.documentElement.outerHTML
ShowText "" allhtml
;allhtml.setfile("...")

Hide table.

Code:
Copy      Help
int w1=win("Quick Macros :: View topic")
MSHTML.IHTMLElement table=htm("TABLE" "" "" w1 0 5 0x20)
table.outerHTML=""


Forum Jump:


Users browsing this thread: 2 Guest(s)