+ Reply to Thread
Results 1 to 2 of 2

Exporting Specific Rows of a Web Table

Hybrid View

  1. #1
    Registered User
    Join Date
    07-20-2013
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Exporting Specific Rows of a Web Table

    Hi.. I'm currently using this code:

    Sub Test()
    
    Dim ws As Worksheet
    Application.ScreenUpdating = False
    Set ws = ActiveSheet
    
    'http://mywebsite.com/test=12345&Date=8/16/2013&abc=1"
    
    Dim strDate As String
    
    strDate = Date
    www = "URL;http://mywebsite.com/test=12345&Date=" _
    & strDate & "&abc=1"
    
    Sheets("Test").Activate
    
    With ActiveSheet.QueryTables.Add(Connection:=www, Destination:=Range("'Test'!A1"))
    
    ws.Activate
    Application.ScreenUpdating = True
    
    .Name = _
    "Test"
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True
    .RefreshOnFileOpen = False
    .BackgroundQuery = True
    .RefreshStyle = xlOverwriteCells
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = True
    .RefreshPeriod = 0
    .WebSelectionType = xlSpecifiedTables
    .WebFormatting = xlWebFormattingNone
    .WebTables = "10"
    .WebPreFormattedTextToColumns = True
    .WebConsecutiveDelimitersAsOne = True
    .WebSingleBlockTextImport = False
    .WebDisableDateRecognition = False
    .WebDisableRedirections = False
    .Refresh BackgroundQuery:=False
    End With
    End Sub
    This code pulls the exact web table that I want.. The problem that I'm experiencing is....

    This table is too BIG! The table that it's querying is 4500 rows. I only need about 25 specific rows of this whole table. At most, I would only need the first 1535 rows...and this would absolutely contain all of the data that I need. When I do this with a total of 30+ different pages...it takes forever!


    Is there any way to code this so that it only brings in a very specific rows? Or even just the first 1500 rows so that the query doesn't take so long?

    As always, appreciate any help that I can get!!!!

  2. #2
    Registered User
    Join Date
    07-20-2013
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Exporting Specific Rows of a Web Table

    Anyone have any ideas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Create a sub-table by specifying specific rows from another table
    By exgrom in forum Excel General
    Replies: 1
    Last Post: 10-22-2012, 06:49 PM
  2. Replies: 0
    Last Post: 09-17-2012, 11:10 AM
  3. [SOLVED] Exporting Access table to Specific file/cell
    By Kinez101 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2012, 08:48 PM
  4. The sum in a table of specific rows.
    By ExIsG in forum Excel - New Users/Basics
    Replies: 14
    Last Post: 08-02-2010, 02:13 AM
  5. [SOLVED] Exporting specific rows in another Sheet
    By MS Excel in forum Excel General
    Replies: 8
    Last Post: 11-20-2005, 03:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1