简体   繁体   English

使用 Excel Power Query 到 OneDrive/Sharepoint 中共享的 .XLSX 时出现 404 文件未找到错误

[英]404 File Not Found error using Excel Power Query to .XLSX shared in OneDrive/Sharepoint

I have built a .XLSM (macro-enabled) Excel file that uses standard "Web" method to get data from a .XLSX worksheet saved in my organizational OneDrive for Business/Sharepoint;我构建了一个 .XLSM(启用宏的)Excel 文件,该文件使用标准的“Web”方法从保存在我的组织 OneDrive for Business/Sharepoint 中的 .XLSX 工作表中获取数据; the file in OneDrive is permissioned to be accessed only by those in Organization. OneDrive 中的文件仅允许组织中的人员访问。 The file is macro-enabled for other purposes, but not for making the data query.该文件启用宏用于其他目的,但不用于进行数据查询。

I followed the guidance in the following documentation (from Microsoft) https://docs.microsoft.com/en-us/power-bi/desktop-use-onedrive-business-links我遵循以下文档(来自 Microsoft) https://docs.microsoft.com/en-us/power-bi/desktop-use-onedrive-business-links 中的指导

I can then successfully connect to the file and pull down the data in the remote worksheet, but when I share the Excel local file that is making the query with another user in my Organization, they receive an error that the query is not able to be completed.然后我可以成功连接到该文件并下拉远程工作表中的数据,但是当我与组织中的另一个用户共享进行查询的 Excel 本地文件时,他们收到一个错误,表明该查询无法进行完全的。

It appears that Excel is taking the part of my original URL after the Organizational OneDrive domain, and placing it within a relative URL API call. Excel 似乎在组织 OneDrive 域之后占用了我的原始 URL 的一部分,并将其放置在相对 URL API 调用中。

Here is the error message they receive (I have modified some of the base URL):这是他们收到的错误消息(我修改了一些基本 URL):

[DataSource.Error] Web.Contents failed to get contents from ' https://organization-my.sharepoint.com/personal/username/_api/web/getfilebyserverrelativeurl ('/personal/username/Documents/foo/bar/test_file.xlsx')/$value' (404): Not Found [DataSource.Error] Web.Contents 无法从 ' https://organization-my.sharepoint.com/personal/username/_api/web/getfilebyserverrelativeurl ('/personal/username/Documents/foo/bar/test_file. xlsx')/$value' (404):未找到

I don't see this URL or the getfilebyserverrelativeurl function at all in my own version of the file (I'm logged in to the local Excel as the same user that owns the OneDrive account hosting the remote file) - what is Excel/OneDrive doing when it is trying to be accessed by other users who are permissioned to access the file through the Organization?在我自己的文件版本中,我根本看不到此 URL 或 getfilebyserverrelativeurl 函数(我以拥有托管远程文件的 OneDrive 帐户的同一用户身份登录到本地 Excel) - 什么是 Excel/OneDrive当它试图被其他有权通过组织访问文件的用户访问时,该怎么办? Is there some setting I need to change in the file?我需要在文件中更改一些设置吗?

The user will need to get data from web using the following link:用户需要使用以下链接从网络获取数据:
https://organization-my.sharepoint.com/personal/yourusername_domain_com/Documents/foo/bar/file%20name.xlsx https://organization-my.sharepoint.com/personal/yourusername_domain_com/Documents/foo/bar/file%20name.xlsx

The think you need to validate is您需要验证的想法是

  1. organization-my.sharepoint.com组织-my.sharepoint.com
  2. yourusername_domain_com - (Username of the owner of the file, along with domain) yourusername_domain_com -(文件所有者的用户名以及域)
  3. Documents/foo/bar - (file folder path) Documents/foo/bar - (文件夹路径)
  4. file%20name - (all spaces in file name should be replaced with "%20") file%20name -(文件名中的所有空格都应替换为“%20”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Power Query:从在线 Excel 工作簿(OneDrive、SharePoint)获取数据 - Power Query: Get Data from an online Excel workbook (OneDrive, SharePoint) Excel、vba 和 onedrive 或 sharepoint 文件共享 - Excel, vba, and onedrive or sharepoint file sharing 使用C#和ASP.NET MVC在OneDrive上读取Excel(xlsx)文件 - Read an Excel (xlsx) file on OneDrive using C# & ASP.NET MVC Excel power query gives DataSource.Error web.content failed to get content from api url (404):Not Found - Excel power query gives DataSource.Error web.content failed to get content from api url (404):Not Found 是否有任何 REST API 用于在 OneDrive 云中创建新的 Excel (.xlsx) 文件 - Is there any REST API for creating new Excel (.xlsx) file in OneDrive cloud 使用电源自动更新带有 excel 文件的 Sharepoint-List - Update Sharepoint-List with with excel-file using power automate 在具有强大查询功能的Sharepoint上上传Excel工作表 - Upload excel sheet on sharepoint having power query 如何从 my.sharepoint.com (onedrive) 下载 Excel 文件 - How to download Excel file from my.sharepoint.com (onedrive) 从Sharepoint打开文件时Excel .xlsx VBA ADODB连接错误 - Excel .xlsx VBA ADODB connection error when opening file from sharepoint 使用 Excel VBA 打开 OneDrive 上的文件 - Open a file on OneDrive using Excel VBA
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM