Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Diamond Member Array Bill Bundle's Avatar
    Join Date
    Mar 2012
    Location
    Stockland
    Posts
    685
    Thanks
    144
    Thanked 444 Times in 209 Posts

    [REQ] Need help with Excel code.

    If anyone here knows how to program VBA in MS Excel, please help. I'd like to use the code in this article, but there's some errors in it. Please help to correct the errors and post it somewhere for downloading. Thanks.
    Free NSE Intraday Backfill Data from Google Finance
    https://liveniftytrading.wordpress.com/2015/05/29/free-nse-intraday-backfill-data-from-google-finance/comment-page-1/#comment-40

    Google Backfill Dowloader Excel Sheet
    https://drive.google.com/file/d/0B-xd75dzcMThYWJzcmJjcWhBZ2M/view?usp=sharing

  2. Platinum Member Array
    Join Date
    Oct 2011
    Location
    Asia
    Posts
    723
    Thanks
    201
    Thanked 426 Times in 157 Posts
    @Bill Bundle, What error you are getting ?

    Do note that, you have to define the file location, where output file will be saved in csv format.

    By default, Output file location is - D:\TRADING\NSE EOD Data Downloader v2.2\Eod\

    Either create it on your machine in above style, else define you custom path (say you want D:\DATA) then you open the VBA editor (Alt+F11) - Goto Module1 -> find Procedure "ExportGoogleDataToCsv" at Line 220 change the file path to

    CSVFile = "D:\DATA\GoogleBackfill " & todaydate & ".csv"

  3. #3
    Diamond Member Array Bill Bundle's Avatar
    Join Date
    Mar 2012
    Location
    Stockland
    Posts
    685
    Thanks
    144
    Thanked 444 Times in 209 Posts
    @FFRT
    Thanks, but have you tried it and it works? I changed the path as you recommended, but I get a compile error and it's not on the file path. It's in the Range2CSV function. Why is there an error there? I'm using x64 bit 2016 Excel. How do you get line numbers in the code?

    Quote Originally Posted by FFRT View Post
    @Bill Bundle, What error you are getting ?

    Do note that, you have to define the file location, where output file will be saved in csv format.

    By default, Output file location is - D:\TRADING\NSE EOD Data Downloader v2.2\Eod\

    Either create it on your machine in above style, else define you custom path (say you want D:\DATA) then you open the VBA editor (Alt+F11) - Goto Module1 -> find Procedure "ExportGoogleDataToCsv" at Line 220 change the file path to
    Last edited by Bill Bundle; 09-08-2017 at 05:34 PM.

  4. #4
    Platinum Member Array
    Join Date
    Oct 2011
    Location
    Asia
    Posts
    723
    Thanks
    201
    Thanked 426 Times in 157 Posts
    yes, i tried, it works in Win8.1 64 bit. Any screenshots showing your error please.

    Since you are referring to Range2CSV, I'm suggesting, possibly may not be correct with half understood query, are you trying to pull more than 100 symbols?

    Its current Name Range is restricted to 100 symbols only, but if you wish to add more, you can modify the range from Formulas->Name Manager-> and refer to REFERENCE where "Mystock list" towards end is defined, and modify the range.

    P.S.:It works for more than 100 symbols, as well.

  5. #5
    Diamond Member Array Bill Bundle's Avatar
    Join Date
    Mar 2012
    Location
    Stockland
    Posts
    685
    Thanks
    144
    Thanked 444 Times in 209 Posts
    @FFRT,
    See screenshot below. I'm only testing one ticker. Here is the file that I'm working with. https://www.expirebox.com/download/3ea2f666c1a9491832c02a944f6c54e1.html

    Quote Originally Posted by FFRT View Post
    yes, i tried, it works in Win8.1 64 bit. Any screenshots showing your error please.

    Since you are referring to Range2CSV, I'm suggesting, possibly may not be correct with half understood query, are you trying to pull more than 100 symbols?

    Its current Name Range is restricted to 100 symbols only, but if you wish to add more, you can modify the range from Formulas->Name Manager-> and refer to REFERENCE where "Mystock list" towards end is defined, and modify the range.

    P.S.:It works for more than 100 symbols, as well.
    Attached Images
    Last edited by Bill Bundle; 09-08-2017 at 07:29 PM.

  6. #6
    Standard Member Array
    Join Date
    Jan 2010
    Posts
    8
    Thanks
    0
    Thanked 6 Times in 3 Posts
    Quote Originally Posted by Bill Bundle View Post
    @FFRT,
    See screenshot below. I'm only testing one ticker. Here is the file that I'm working with. https://www.expirebox.com/download/3ea2f666c1a9491832c02a944f6c54e1.html



    The highlighted bit should be RangeCSV - the same name as the function.

  7. #7
    Diamond Member Array Bill Bundle's Avatar
    Join Date
    Mar 2012
    Location
    Stockland
    Posts
    685
    Thanks
    144
    Thanked 444 Times in 209 Posts
    Yes it is. The loop is accumulating the list into a variable named "tmp" and the list content is then assigned to the function "RangeCSV". So why is there an error? Does have anything to do with Windows 10 x64 that I'm using?

    Quote Originally Posted by swandro View Post
    The highlighted bit should be RangeCSV - the same name as the function.

  8. #8
    Platinum Member Array
    Join Date
    Oct 2011
    Location
    Asia
    Posts
    723
    Thanks
    201
    Thanked 426 Times in 157 Posts
    No, as your error says, "Variable not defined". It has nothing to do with function name. Are you using any function directly, or from its parameter sheet you are selecting to download? I dont get any errors.
    Last edited by FFRT; 09-09-2017 at 01:28 PM.

  9. #9
    Diamond Member Array Bill Bundle's Avatar
    Join Date
    Mar 2012
    Location
    Stockland
    Posts
    685
    Thanks
    144
    Thanked 444 Times in 209 Posts
    @FFRT
    I'm using the spreadsheet just as I downloaded it. The only change that I made was to the download path that you suggested. I'll have to check if my system has all the necessary Windows .NET utilities that the Office system requires. I cannot think of anything else.

    Quote Originally Posted by FFRT View Post
    No, as your error says, "Variable not defined". It has nothing to do with function name. Are you using any function directly, or from its parameter sheet you are selecting to download? I dont get any errors.

  10. #10
    Diamond Member Array Bill Bundle's Avatar
    Join Date
    Mar 2012
    Location
    Stockland
    Posts
    685
    Thanks
    144
    Thanked 444 Times in 209 Posts
    Well my .NET installation is up to date. Could there be anything else?
    https://docs.microsoft.com/en-us/dotnet/framework/install/on-windows-10


    Attached Images

Page 1 of 2 12 LastLast

Similar Threads

  1. Gann & excel
    By goffredomameli in forum Trading Platform
    Replies: 3
    Last Post: 01-26-2017, 01:54 PM
  2. Excel Spreadsheets
    By Bill Bundle in forum Trading Platform
    Replies: 25
    Last Post: 12-16-2012, 02:38 AM
  3. MT4 indicator on Excel?
    By 123abc in forum Mql Programming and Coding
    Replies: 2
    Last Post: 02-26-2011, 05:07 AM

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
  •