+ Reply to Thread
Results 1 to 3 of 3

Web Query of tables from a list of URLs

  1. #1
    Registered User
    Join Date
    08-03-2016
    Location
    Kuala Lumpur
    MS-Off Ver
    2013
    Posts
    2

    Web Query of tables from a list of URLs

    i have a list of URLs with 2 tables each which i need to extract into multiple worksheets

    http://klse.i3investor.com/servlets/stk/fin/0001.jsp
    http://klse.i3investor.com/servlets/stk/fin/0002.jsp
    http://klse.i3investor.com/servlets/stk/fin/0003.jsp
    .
    .
    .
    .
    .
    http://klse.i3investor.com/servlets/stk/fin/9999.jsp

    there's an example in the attachment of what i actually need.

    thanks in advance
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Web Query of tables from a list of URLs

    So what's the problem?

  3. #3
    Registered User
    Join Date
    08-03-2016
    Location
    Kuala Lumpur
    MS-Off Ver
    2013
    Posts
    2

    Re: Web Query of tables from a list of URLs

    well im not really familiar with macro and this is what i recorded but i don't know how to get it to loop for the entire list



    Sub Macro1()
    '
    ' Macro1 Macro
    '

    '
    ActiveWorkbook.Worksheets.Add
    With ActiveSheet.QueryTables.Add(Connection:= _
    "URL;http://klse.i3investor.com/servlets/stk/fin/0001.jsp", Destination:= _
    Range("$A$1"))
    .CommandType = 0
    .Name = "0001"
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True
    .RefreshOnFileOpen = True
    .BackgroundQuery = True
    .RefreshStyle = xlInsertDeleteCells
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = False
    .RefreshPeriod = 0
    .WebSelectionType = xlSpecifiedTables
    .WebFormatting = xlWebFormattingNone
    .WebTables = "6,""stockhdr"",9,10"
    .WebPreFormattedTextToColumns = True
    .WebConsecutiveDelimitersAsOne = True
    .WebSingleBlockTextImport = False
    .WebDisableDateRecognition = False
    .WebDisableRedirections = False
    .Refresh BackgroundQuery:=False
    End With
    Sheets("Sheet2").Select
    Sheets("Sheet2").Name = "0001"
    End Sub

+ 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] Any way to automate urls for web query creation?
    By SandPounder1 in forum Excel General
    Replies: 10
    Last Post: 02-07-2014, 05:31 PM
  2. Using web query to download data from multiple urls.
    By jackuspi2010 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2013, 07:04 AM
  3. How to Pull Identical Tables to one Sheet from a List of URLs
    By gfertel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2012, 03:29 PM
  4. [SOLVED] Dynamic Web Query using Multiple URLs
    By cliff_vanderlinden in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-11-2012, 03:29 PM
  5. EXCEL VBA: web query from a list of URLs within cells
    By IDONTTELLYOU in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2012, 01:10 AM
  6. Excel Web Query - Multiple URLs
    By nevs in forum Excel General
    Replies: 1
    Last Post: 07-15-2011, 04:06 AM
  7. using web query and javascript urls
    By francisos in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-20-2008, 08:42 PM

Tags for this Thread

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