Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Web query - one table multiple pages of data

Hi, I need to export a table from web to excel. The table is large and the
web only shows 20 entries per page and there are over 100 pages. I recorded
a macro to pull over one page at a time but as more things are added to the
table the pages increase and when they increase I need to add a new block of
code.

I have a feeling it's possible to get the whole table, irrespective of
number of pages in the one go. However, I don't know how to do that. Could
you let me know if this is actually possible and how to go about it please?

A section of the code is at end of this message. For each new page I
increase all numbers by 20.

Thanks for your help.

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.websitename/tbl_tablename.asp?start=1", _
Destination:=Range("$A$1"))
.Name = "tbl_tablename.asp?start=1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "4"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Web query - one table multiple pages of data

Try recording a macro to edit instead of add. While doing use ALL sheets
instead of sheet 4
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"refresh" wrote in message
...
Hi, I need to export a table from web to excel. The table is large and the
web only shows 20 entries per page and there are over 100 pages. I
recorded
a macro to pull over one page at a time but as more things are added to
the
table the pages increase and when they increase I need to add a new block
of
code.

I have a feeling it's possible to get the whole table, irrespective of
number of pages in the one go. However, I don't know how to do that.
Could
you let me know if this is actually possible and how to go about it
please?

A section of the code is at end of this message. For each new page I
increase all numbers by 20.

Thanks for your help.

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.websitename/tbl_tablename.asp?start=1", _
Destination:=Range("$A$1"))
.Name = "tbl_tablename.asp?start=1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "4"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Table Query MythicZohar Excel Worksheet Functions 4 August 18th 09 04:54 AM
Multiple Table Query MythicZohar New Users to Excel 1 August 18th 09 02:08 AM
web query 2003 returns no data from some web pages DianneZ Excel Discussion (Misc queries) 0 September 12th 07 08:02 PM
Web Query from multiple varying length pages Jeffshex Excel Worksheet Functions 3 August 25th 07 12:21 AM
How do I create a pivot table from multiple pages of data? PT Cruiser Excel Worksheet Functions 3 August 19th 05 09:41 PM


All times are GMT +1. The time now is 05:13 PM.

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"