无法使用Microsoft Graph API REST端点获取共享工作簿的工作表 [英] Unable to get worksheets for shared workbooks using Microsoft Graph API REST endpoint

查看:209
本文介绍了无法使用Microsoft Graph API REST端点获取共享工作簿的工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取共享工作簿/workbook/worksheets的工作表.我可以获取个人工作簿的工作表,但获得共享工作簿的无效资源

how to get worksheets of a shared workbook /workbook/worksheets. I am able to get worksheets for personal workbooks but get invalid resource for shared workbooks

推荐答案

终于使它起作用了!

为了在Office 365中获取共享工作簿的作品集,需要使用以下终结点

In order to get workseets of shared workbooks in office 365 need to use the following endpoint

https://graph.microsoft.com/v1.0/drives/ {remoteItem.parentReference.driveId}/items/{remoteItem.id}/workbook/worksheets

https://graph.microsoft.com/v1.0/drives/{remoteItem.parentReference.driveId}/items/{remoteItem.id}/workbook/worksheets

为了获得{remoteItem.parentReference.driveId}和{remoteItem.id},请使用以下端点

In order to get {remoteItem.parentReference.driveId} and {remoteItem.id} use following endpoint

感谢@Petaflop建议检查所有范围.出于某种原因,您可以使用读取权限"列出文件,但需要使用"Read.All"列出工作表.(@ Petaflop如果未删除,则会给出您的答号:))

Thanks to @Petaflop for suggesting to check all the scopes. For some reason the you can list the files using Read permisson but need Read.All for listing the worksheets.(@Petaflop would have given your answer the tick if it were not deleted :))

>://://graph.microsoft.com/v1. 0/me/drive/search(q = '.xlsx')?select = name,id,parentReference

https://graph.microsoft.com/v1.0/me/drive/search(q='.xlsx')?select=name,id,parentReference

这篇关于无法使用Microsoft Graph API REST端点获取共享工作簿的工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆