LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default count record in web page...


i have this hard prob to modify my old macro:
Attached is the macro it work with a cicle For NbPages = 65 To 90
inested this cicle is possible:

first solution for me:
count the record in ie.inner into: Pagine 1 di 4 and click on AVANTI
button for 4 click and for ech click get data from table
second soultion for me:
click on AVANTI button do until the sheet is filled with the number of
record counted in: "Totale fidi individuati:" in this case 308 reord
other info: each table can contian max 100 record....
attached html and image
http://www.mytempdir.com/674315

Sub Importer_tableauPageWeb_V02()

'activate Microsoft HTML Objects Library
'activate Microsoft Internet Controls
'
Dim IE As InternetExplorer
Dim maPageHtml As HTMLDocument
Dim Htable As IHTMLElementCollection
Dim maTable As IHTMLTable
Dim J As Integer, I As Integer, X As Integer, LINEA As Integer
Dim NbPages As Byte, Y As Byte

Application.ScreenUpdating = False

For NbPages = 65 To 90

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate
"http://antfat/antfat/ewaf/elencoSbilanci;jsessionid=TkmfJxApZQ8Z6V4GAjSiStN= "
& Chr(NbPages)
Do Until IE.readyState = READYSTATE_COMPLETE
DoEvents
Loop

Set maPageHtml = IE.document
Set Htable = maPageHtml.getElementsByTagName("table") 'objet type
table

For X = 2 To Htable.Length - 1

If X = 2 And NbPages = 65 Then
Y = 1
Else
Y = 2
End If

Set maTable = Htable(X)

For I = Y To maTable.Rows.Length 'rows in table

LINEA = LINEA + 1

For J = 1 To maTable.Rows(I - 1).Cells.Length 'each cell in row
Cells(LINEA, J) = maTable.Rows(I - 1).Cells(J - 1).innerText
Next J

Next I
Next X

DoEvents
IE.Quit
Set IE = Nothing
Next NbPages

Application.ScreenUpdating = True

End Sub


--
sal21


------------------------------------------------------------------------
sal21's Profile: http://www.excelforum.com/member.php...fo&userid=2040
View this thread: http://www.excelforum.com/showthread...hreadid=543395

 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I create a page by page yearly diary to record bookings alfiesoane Excel Worksheet Functions 1 September 13th 09 07:14 PM
Print each record per page gabch Excel Worksheet Functions 1 May 20th 06 11:03 PM
record count using two different cells Josborne Excel Worksheet Functions 1 November 1st 04 09:51 PM
how do count all record in one column ducmis[_4_] Excel Programming 2 April 1st 04 10:10 PM
Record Count (There has to be an easier way...) pikus Excel Programming 5 December 30th 03 06:22 PM


All times are GMT +1. The time now is 06:38 AM.

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

About Us

"It's about Microsoft Excel"