Power Query in Excel different from Power Query in Power BI

Christian CROCHE 1 Reputation point
2021-03-14T20:22:10.637+00:00

Hello everyone! I mainly use Power Query in Power BI and recently in Excel. I noticed some differences between these two "versions" of Power Query (in the M language ,for instance). Recently, I noticed a blocking difference: in PQry for PBI I can access all the files of a SharePoint site library. If I do the same operation with PQry in Excel, some folders are invisible and inaccessible. Have you ever had this experience? Do you know the cause and solution to this weirdness? Thanks for your help!

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,990 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,640 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Matt Allington 332 Reputation points MVP
    2021-03-15T08:21:26.507+00:00

    You should not post the same question on 2 different forums. It is disrespectful to those who answer questions, only to find out that you have already got the answer somewhere else. 


  2. Emi Zhang-MSFT 21,856 Reputation points Microsoft Vendor
    2021-03-15T09:04:44.473+00:00

    Hi @Christian CROCHE ,
    Did you need any permissions to access these files in SharePoint?
    Did all kinds of files cannot be load in Excel?
    I suggest you read this article and confirm if it is helpful:
    https://learn.microsoft.com/en-us/power-query/connectors/sharepointfolder
    Please be a bit more precise to explain your problem so that I can get more accurate solutions to this problem. I’m glad to help and follow up your reply.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Christian CROCHE 1 Reputation point
    2021-03-22T07:38:47.567+00:00

    Dear @Emi Zhang-MSFT , I have the owner permissions on the SharePoint website I’m pointing at. All types of file are visible to me and I can access them in the SharePoint. I want to access a specific file in a given folder and select the last version of it by its "last modified date" property. This is the process that I follow (the screenshots are in French but you’ll certainly be able to see what it’ about). I do this at the same time in Power Query for Excel and in Power Query for Power BI:

    • I choose a connexion to a SharePoint folder:
      80044-image.png
    • I then navigate to this folder:
      79987-image.png
    • I connect to the site with my professional credentials and select the upmost level to apply the settings
      80015-image.png
    • I’m then presented with the list of files (at least, a part of them):
      80102-image.png
    • I choose to modify this list in order to select the ONE file I’m interested in:
      I filter the list by folder starting with…:
      80112-image.png
    • I then get an empty list in Pwr Qry for Excel whereas I get a correct list of the files I need in Pwr Qry for PBI:
      In excel: 80112-image.png
      In PBI: 80121-image.png

    Is there any explanation to this behavior? I noticed that the behavior has slightly changed from the previous time I did it: in Excel, I could see some sub-folders of the folder "Médical". Today, I can’t see them anymore.

    Thanks for your help!


  4. Christian CROCHE 1 Reputation point
    2021-03-22T18:55:21.213+00:00

    I may have found something indicating why I can’t find the same thing in Excel. In the Query options / Account, I can’t connect to my account and get this error:
    80329-2021-03-22-19-51-38.png
    I don’t understand what this means but it may be a track to find the solution!
    The details of the error shows:
    Feedback Type:
    Frown (Error)

    Error Message:
    Nous ne pouvons pas contacter le service. Cela peut être dû à votre connexion réseau, ou le service n'est peut-être pas disponible. Si le problème persiste, contactez votre administrateur.

    Stack Trace:
    à System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
    à System.Environment.get_StackTrace()
    à Microsoft.Mashup.Client.UI.Shared.StackTraceInfo.GetCurrent()
    à Microsoft.Mashup.Client.UI.Shared.HtmlControls.Options.AccountPaneHtmlControl.OnClientConfigPollerTimeout(Object sender, EventArgs e)
    à Microsoft.Mashup.Client.UI.Shared.ClientConfigPoller.<>c__DisplayClass2.<OnTimeoutWrapper>b__0()
    à Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
    à Microsoft.Mashup.Client.UI.Shared.ClientConfigPoller.OnTimeoutWrapper(Object sender, EventArgs e)
    à System.Windows.Forms.Timer.OnTick(EventArgs e)
    à System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
    à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    à System.Windows.Forms.Application.ThreadContext.LocalModalMessageLoop(Form form)
    à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    à System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    à Microsoft.Mashup.Client.UI.Shared.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
    à Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModalT
    à Microsoft.Mashup.Client.Excel.FloatingDialogs.OptionsDialog.Show(IWindowHandle owner, IUIHost uiHost, ApplicationTracingHost applicationTracingHost, Queries queries, OptionsDialogInfo dialogInfo, Boolean applicationAllowsUpdate, Boolean applicationSupportsDataModel, Boolean isDataCatalogEnabledByFederationEnv, Boolean canEditFile)
    à Microsoft.Mashup.Client.Excel.DialogManager.ShowSettingsDialog(IWindowHandle ownerWindow, IWorkbook workbook)
    à Microsoft.Mashup.Client.Excel.Shim.IWindowContextExtensions.TryInvokeOnParentWorkbook(IWindowContext windowContext, Action`1 action)
    à Microsoft.Mashup.Client.Excel.ExcelRibbonHandler.OnOptionsAction(IWindowContext windowContext)
    à Microsoft.Mashup.Client.Excel.NativeRibbonHandler.<>c__DisplayClass1.<OnRibbonButtonAction>b__0()
    à Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
    à Microsoft.Mashup.Client.Excel.ExcelCallbackManager.InvokeAndReturnHResult(Action action)

    Invocation Stack Trace:
    à Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
    à Microsoft.Mashup.Client.UI.Shared.StackTraceInfo.GetCurrent()
    à Microsoft.Mashup.Client.UI.Shared.HtmlControls.Options.AccountPaneHtmlControl.OnClientConfigPollerTimeout(Object sender, EventArgs e)
    à Microsoft.Mashup.Client.UI.Shared.ClientConfigPoller.<>c__DisplayClass2.<OnTimeoutWrapper>b__0()
    à Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
    à Microsoft.Mashup.Client.UI.Shared.ClientConfigPoller.OnTimeoutWrapper(Object sender, EventArgs e)
    à System.Windows.Forms.Timer.OnTick(EventArgs e)
    à System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
    à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    à System.Windows.Forms.Application.ThreadContext.LocalModalMessageLoop(Form form)
    à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    à System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    à Microsoft.Mashup.Client.UI.Shared.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )
    à Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModalT
    à Microsoft.Mashup.Client.Excel.FloatingDialogs.OptionsDialog.Show(IWindowHandle owner, IUIHost uiHost, ApplicationTracingHost applicationTracingHost, Queries queries, OptionsDialogInfo dialogInfo, Boolean applicationAllowsUpdate, Boolean applicationSupportsDataModel, Boolean isDataCatalogEnabledByFederationEnv, Boolean canEditFile)
    à Microsoft.Mashup.Client.Excel.DialogManager.ShowSettingsDialog(IWindowHandle ownerWindow, IWorkbook workbook)
    à Microsoft.Mashup.Client.Excel.Shim.IWindowContextExtensions.TryInvokeOnParentWorkbook(IWindowContext windowContext, Action`1 action)
    à Microsoft.Mashup.Client.Excel.ExcelRibbonHandler.OnOptionsAction(IWindowContext windowContext)
    à Microsoft.Mashup.Client.Excel.NativeRibbonHandler.<>c__DisplayClass1.<OnRibbonButtonAction>b__0()
    à Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
    à Microsoft.Mashup.Client.Excel.ExcelCallbackManager.InvokeAndReturnHResult(Action action)

    Supports Premium Content:
    True

    0 comments No comments