+ Reply to Thread
Results 1 to 23 of 23

Code Issue to Extract Data from Online Web Source (.csv)

  1. #1
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Code Issue to Extract Data from Online Web Source (.csv)

    I have some code that returns the above message sometimes, not all the time.
    The web site is worldwideweb dot cboe dot com/publish/scheduledtask/mktdata/datahouse/vixcurrent.csv
    The site contains public information that can be opened in Excel.
    What I mean by sometimes when I Googled the error and found a close answer on this forum. I went back to the site and checked it and the data was downloaded. I then ran the program and the program ran without errors. This is frustrating behavior because it doesn't manifest itself all the time.
    I have added two keys in the registry that I hoped might solve my problem while using Excel 2007.
    The two keys are:

    Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings setting a Dword named BypassSSLNoCacheCheck to a value of 1
    Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\ForceShellExecute setting a Dword named ForceShellExecute to a value of 1

    As one would note both/neither have been successful all the time (one error and one completion just tonight. Any suggestions?

    This is frustrating also as I am unable to post the web page or the code
    Last edited by AliGW; 01-11-2020 at 01:55 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: The resource cannot be displayed because the file extension is not being accepted by y

    Welcome to the forum.

    You may not, as a new member, post links, however you may post the code in the body of your post and you may attach a workbook (see the yellow banner at the top of the page).

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new, I wil do it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: The resource cannot be displayed because the file extension is not being accepted by y

    As you have changed the thread title, the question remains. Often but not always I get the error message that was in the original title:
    "The resource cannot be displayed because the file extension is not being accepted by your browser" I am looking for help in avoiding/bypassing/eliminating the error and being successful in downloading a csv file 100 % of the time. That seemed a bit longer than titles are allowed. I understand your insight on the title.
    I attempted to post the code, but since the code contains the web address that prevented the forum from accepting the post, so I left it out.
    Now I will add a few facts not presented in the original post, as I was getting pretty frustrated in posting just the first one.
    The behavior is exhibited in 3 browsers. So I'm not sure that it is a browser issues, but more of an Excel, but I could be wrong.

    You can see the two attempts at editing the registry and that has not worked all the time, as I am posting here.
    I'm using Win 10 with Excel 2007. Not too much more to add until posting the code.

    Attempted three times to quote you, Ali, but your post contained a web address and this wasn't allowed.

  4. #4
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    I could attach my workbook as it contains public data, no proprietary data, but is there a size limit on them? It is currently 3.45 M.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    Yes - that's too big. We don't need to see the whole workbook - just a sample that contains the relevant code, etc.

    There was no need to quote my post - why did you want to?

    You can post code as part of the text of your message.

  6. #6
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    I attempted to quote you to answer specific points posted by you.
    The code can't be posted since it contains a web address that your restrictions prevents, but let me think of a way to eliminate the Uniform Resource Locator out of the code.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    Just remove the web address from the code - put "web address here" instead.

    You don't need to quote the post immediately above your own - it's only necessary if the are separated in some way in the thread.

  8. #8
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    Here is the code snippet
    Please Login or Register  to view this content.
    The web address was butchered to comply with restrictions.

  9. #9
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    The web address might be prudent to see if others have the same issue.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    Just present it like this:

    cboe dot com slash etc.

    Once you have posted a few more times, you won't be restricted, It's an anti-SPAM measure.

  11. #11
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    Yes that is what I did essentially. I understand the reasons for restrictions, it is just frustrating when the web address is at the heart of the problem of the download. Grrrrr

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    Not really ... You posted this:

    world wide web dot cboe dot com/Remainder of address/ vixcurrent dot csv

    What should the bit in red be? Let me know and I'll post a clickable link for you.

  13. #13
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    This one works for me;

    Please Login or Register  to view this content.
    .

  14. #14
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    Haluk:
    That is the precise address for the code and it works for me SOMETIMES not all the time and thus my issue.

    Ali:
    See Haluk's code for the address.

  15. #15
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    Haluk:

    The error I get when it doesn't work is:
    "The resource cannot be displayed because the file extension is not being accepted by your browser"
    But it fails in all browsers edge, firefox and ie when it fails, executes in all browsers when it works.
    That is why I suspect an Excel issue not a browser issue, but I accept that assumption may be wrong.

  16. #16
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    I'm not sure if this helps but, you can try the below code as well...

    Please Login or Register  to view this content.
    .

  17. #17
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    I added the for loop, good idea.
    I will attempt the other corrections Monday night when I refresh the data, I do hope these might fix the issue.
    Thanks

  18. #18
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    No issues with my original code so I'll have to and find a day where the code fails to try yours.

  19. #19
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    I did take your code suggestions and ran them on a blank sheet. I should have guessed with the word "TEXT" what the result would be, but I didn't. I did this bit of code, but then I had to run a function TextToNumber or something similar to put the text into numbers for ease of putting the numbers into my sheet. I abandoned that procedure and went to adding a VixData sheet taking number from that sheet into the Vix sheet and then deleting the VixData sheet. But thanks for the suggestion anyway.

  20. #20
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    You don't need to do those extras.... just delete the below line;

    Please Login or Register  to view this content.

    and add the following lines, to make life easy...

    Please Login or Register  to view this content.
    .

  21. #21
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    For all that don't know, what does the 3 indicate in the Array?
    Last edited by AliGW; 01-15-2020 at 02:04 PM. Reason: Please don't quote unnecessarily!

  22. #22
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    3 stands for the 1st column format as "Date"

    2 stands for other columns format as "Text" and 1 formats the column as "General"

    .

  23. #23
    Registered User
    Join Date
    01-11-2020
    Location
    Houston, Texas
    MS-Off Ver
    2007
    Posts
    14

    Re: Code Issue to Extract Data from Online Web Source (.csv)

    Well the web page did not open and reported the same error message as described in post #15.
    This morning it opened and downloaded as coded.
    Thus my original issue remains there is some setting in the pc, either in all the browsers (not likely in my opinion) or within Excel.
    I will post all the known parameters so all will not have to scroll back.
    Windows 10, Excel 2007 (Not sure which service pack, but I believe it to be 3 or latest provided by MS)

+ 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. Replies: 5
    Last Post: 12-29-2022, 06:35 AM
  2. Replies: 5
    Last Post: 12-23-2022, 04:02 AM
  3. How to Hyperlink Resource Drive Auto update for Resource File.
    By Saikrishna12345 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2015, 03:19 AM
  4. Macro to Lock File if Terms are not Accepted
    By Attrition in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-28-2014, 02:16 AM
  5. Replies: 4
    Last Post: 10-23-2013, 12:54 AM
  6. SaveAs File Name Macro - change date field to accepted format
    By lisa_jd in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-03-2010, 08:46 AM
  7. excel cannot accepted the password and finily cannot open file
    By kumar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-16-2006, 03:45 PM

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