Announcement

Collapse
No announcement yet.

[REQ] Need help with Excel code.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    @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"

    Comment


    • #3
      @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?

      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; 08-09-17, 16:34.

      Comment


      • #4
        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.

        Comment


        • #5
          @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

          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 Files
          Last edited by Bill Bundle; 08-09-17, 18:29.

          Comment


          • #6
            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.

            Comment


            • #7
              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?

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

              Comment


              • #8
                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-17, 12:28.

                Comment


                • #9
                  @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.

                  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.

                  Comment


                  • #10
                    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 Files

                    Comment


                    • #11
                      Error that you showed only says, "variable" not found.....it is not related to .Net or anything else. I just wonder, if it works at my end, why not working on your machine.

                      Comment


                      • #12
                        I'm thinking there must be some VBA utility that didn't load when I installed MS Office and I'm searching the internet for an answer. BTW would you happen to know if the code for MS Excel is the same for Visual Basic 6? I see that VB6 has some utility libraries that might help.

                        Originally posted by FFRT View Post
                        Error that you showed only says, "variable" not found.....it is not related to .Net or anything else. I just wonder, if it works at my end, why not working on your machine.

                        Comment

                        Top Active Users

                        Collapse

                        There are no top active users.
                        Working...
                        X