+ Reply to Thread
Results 1 to 3 of 3

Dealing with datasource.error in Excel Power BI

  1. #1
    Registered User
    Join Date
    03-13-2021
    Location
    Netherlands
    MS-Off Ver
    2019
    Posts
    2

    Dealing with datasource.error in Excel Power BI

    I'm having this piece of code in Excel Power BI for an external datasource (webpage) from which I want to get some data (specific exchange rate).

    Please Login or Register  to view this content.
    In it self, it works. But whenever the site goes down, I'll end up with an annoying pop-up in Excel telling me some Datasource.Error occured while periodically updating my query. I'd like to get rid of that.

    I'm not a programming wizard at all, just copying/pasting bits and pieces from wherever I find them on the internet, meanwhile trying to learn something.
    But I think I need to handle the response code on the Web.Contents call, by adding the optional parameter [ManualStatusHandling={401,403,404}] to the call. Another option might be to put a try-construction in, although the exact status handling would be neater. Can somebody please help me out and show me what the code should look like to properly handle this (or some other) status that might occur, so it does nothing when the mentioned statusses occur and otherwise picks up the data?
    Last edited by alansidman; 03-13-2021 at 01:55 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Dealing with datasource.error in Excel Power BI

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    03-13-2021
    Location
    Netherlands
    MS-Off Ver
    2019
    Posts
    2

    Re: Dealing with datasource.error in Excel Power BI

    Sorry about that, I'll try and comply. Thanks for adding the tags.

+ 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. [SOLVED] Disable error alerts while running Excel Power Query to download web data HTTP Error '500'
    By naira in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-04-2019, 05:02 AM
  2. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  3. How to Disable PowerQuery Popups - Datasource.Error - VBA doesn't work
    By nicoan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-16-2018, 09:57 AM
  4. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 AM
  5. [SOLVED] dealing with #NUM! error
    By jrtaylor in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-19-2016, 07:43 PM
  6. Remove Error when copy Excel pie chart to power point
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-07-2015, 05:01 AM
  7. Best way of dealing with Vlookup #N/A error
    By rasonline in forum Excel General
    Replies: 1
    Last Post: 07-27-2008, 04:01 PM

Tags for this Thread

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