1. #1
    TBsp75
    TBsp75's Avatar Become A Pro!
    Join Date: 06-01-09
    Posts: 267
    Betpoints: 2060

    need help with excel import data from web query

    hi think tank experts, im tryin to import some data from web pages into excel and i noticed that for some website i can use the yellow right-arrowed to import a specific data table i need but some website has to import the whole page.

    for ex. http://espn.go.com/mlb/stats/team/_/...1/seasontype/2. i tried importin the whole page, delete the stuff i dun want but after refreshin it comes back again. is there any way to just import the data table i need rather than the whole page? thanks alot.

  2. #2
    Insoluble
    Insoluble's Avatar Become A Pro!
    Join Date: 05-29-10
    Posts: 71
    Betpoints: 3463

    When I have no choice but to import the whole page I have two ways I can turn that around to make a cleaner table of data:

    1. I hide all the unwanted columns and rows that have extra data so that the imported page looks nicer. This way you can continue to refresh that data and still see the pertinent data properly.

    2. Create a separate sheet that references the cells that have the data of interest so you can transform that data into a better looking table to work with. I often import my data into "import sheets" and then use another sheet where I pull the data from those sheets. Once again this makes it possible to refresh the data and still be able to have a clean data output. Hope that makes sense.

  3. #3
    TBsp75
    TBsp75's Avatar Become A Pro!
    Join Date: 06-01-09
    Posts: 267
    Betpoints: 2060

    great, thanks for helpin. jst one more question, how do u import data from sheet to sheet? tyvm

    Quote Originally Posted by Insoluble View Post
    2. Create a separate sheet that references the cells that have the data of interest so you can transform that data into a better looking table to work with. I often import my data into "import sheets" and then use another sheet where I pull the data from those sheets. Once again this makes it possible to refresh the data and still be able to have a clean data output. Hope that makes sense.

  4. #4
    Insoluble
    Insoluble's Avatar Become A Pro!
    Join Date: 05-29-10
    Posts: 71
    Betpoints: 3463

    You would have to make cell references in the new sheet. For example, lets say you are importing your data into Sheet1 and your relevant data is in D1:G15. If you want to move that data to sheet2 you can go into Sheet2 and in cell A1 you could create the reference "=Sheet1!d1" to capture whatever is in D1 of the original sheet. You can continue "drag and duplicate" that reference to other cells to capture your relevant data also. I assume you know enough about Excel cell references to do the rest.

  5. #5
    TBsp75
    TBsp75's Avatar Become A Pro!
    Join Date: 06-01-09
    Posts: 267
    Betpoints: 2060

    thx 4 ur help man. God bless.


  6. #6
    SKX007
    SKX007's Avatar Become A Pro!
    Join Date: 08-27-11
    Posts: 23
    Betpoints: 234

    Quote Originally Posted by TBsp75 View Post
    hi think tank experts, im tryin to import some data from web pages into excel and i noticed that for some website i can use the yellow right-arrowed to import a specific data table i need but some website has to import the whole page.

    for ex. http://espn.go.com/mlb/stats/team/_/...1/seasontype/2. i tried importin the whole page, delete the stuff i dun want but after refreshin it comes back again. is there any way to just import the data table i need rather than the whole page? thanks alot.
    I am on Excel for mac so not sure if this helps you but, I put the below text file in the query folder and it imports your espn data table clean and nice into Excel.

    WEB
    1
    http://espn.go.com/mlb/stats/team/_/...1/seasontype/2

    Selection=EntirePage
    Formatting=All
    PreFormattedTextToColumns=True
    ConsecutiveDelimitersAsOne=True
    SingleBlockTextImport=False

    There are sample files in the microsoft folder, and all you need to do is the change the webadress and it usually imports fine. Hope this helps.

Top