+ Reply to Thread
Results 1 to 6 of 6

Import csv file from internet (WEB)

  1. #1
    Registered User
    Join Date
    08-18-2004
    Posts
    12

    Import csv file from internet (WEB)

    Hi!
    Searched a lot, but found no solution to my problem.
    I am trying to use macro to import *.csv file data from internet using Data->Import extrenal data->import data. If I use macro recorder to record the procedure and use it again, it is not working. I know from somewhere that it is possible to download .csv file, save it and then import data using macro (I dont know exactly how, but there is possibility to do that). The question is - is it possible to import data using one macro and not saving file to the disc?
    If needed, here is the link to CSV file:
    "http://www.baltic.omxnordicexchange.com/market/?start_d=1&start_m=1&start_y=2000&end_d=24&end_m=7&end_y=2008&pg=nontradeddetails&instrument=LV0000400323&tab=price&lang=lv&currency=0&date=&pg=nontradeddetails&pg2=funddetail&downloadcsv=1&csv_style=baltic".
    Af course I need that data be delimited (using semicolon).

    I will also use procedure that cheks in range A:A for different "instrument=LV0000400323" and changes the link, then creates (if its not already created) sheet and names it "instrument=LV0000400323", and copy data to that sheet... and so on. But for that I know solution... at least I think so

    Thanx in advance!

  2. #2
    Registered User
    Join Date
    05-28-2008
    Posts
    13
    Hi

    You can try QueryTables

    Please Login or Register  to view this content.
    The output format depends on the CSV.

  3. #3
    Registered User
    Join Date
    08-18-2004
    Posts
    12
    Here is the original link!

    http://www.baltic.omxnordicexchange....v_style=baltic
    Last edited by FerVerX; 07-24-2008 at 06:55 AM.

  4. #4
    Registered User
    Join Date
    08-18-2004
    Posts
    12
    Quote Originally Posted by shasur
    Hi

    You can try QueryTables

    Please Login or Register  to view this content.
    The output format depends on the CSV.
    Tried your solution, but everything it imports is as shown on image - imports headers and values, but also, not delimiting items originaly delimited by semicolon!
    Attached Images Attached Images

  5. #5
    Registered User
    Join Date
    08-18-2004
    Posts
    12
    Not sure that this is correct, but it works

    Please Login or Register  to view this content.
    Maybe theres's a way to optimize the code, but if not - hey IT WORKS ANYWAY!

  6. #6
    Registered User
    Join Date
    09-10-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Import csv file from internet (WEB)

    Hi i am trying to do same thing with yahoo quotes in yahoo finance.

    i already have a running macro wherein if i input a stocks quote in a cell and adjacent to that in a different cell if i type Y/N and run the macro... the macro will create the sheet with that stock's quote as the sheet name if its a Y and will delete it if its a N...

    This is the yahoo stock Quote for example (TATASTEEL.NS)

    what i want is after the sheet is created i want the macro to download the file from this link
    (http://ichart.finance.yahoo.com/tabl...=d&ignore=.csv)

    Where u can see it Uses that Quote and also has a date range.

    i want the macro to change that quote accordingly with the quote in my cell from where its creating that new sheet in the first place. and after that i want the macro to change the second part of the date to current that... here in the link 2010 is the current year... before that 10 is the todays date.... and 08 is the month which is September (as per yahoo)

    and once the file is downloaded i want to copy a specific date from it to the newly created sheet.

    So whenever i type in Y and run the macro... first it will create a New sheet with the name of the quote then it will go to that weblink and download or open it... then copy the required data from it... and paste it in the new sheet...

    I am new to VBA codes... if any one can help would highly appreciate it.

    Regards
    Mayur
    [email protected]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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