如何在 EXCEL SHAREPOINT 文件 (JSON) 中读取元数据 [英] HOW READ METADATA IN EXCEL SHAREPOINT FILE (JSON)
本文介绍了如何在 EXCEL SHAREPOINT 文件 (JSON) 中读取元数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从共享点获取了数据,但无法读取表或数据,因为在 JSON 中如何获取元数据中的值
spauth.getAuth(url, {用户名:用户名,密码:密码}).then(功能(选项){控制台日志(列表标题)var headers = options.headers;headers['Accept'] = 'application/json;odata=verbose';//拉取 SharePoint 列表项requestprom.get({url: url+"/_api/web/lists/getbytitle('文档')/items(xxxx)",标题:标题,json: 真}).then(函数(列表响应){//var items = listresponse.d;var items = listresponse;var responseJSON = [];console.log(items);
官方文档供大家参考:获取工作表
I got the data from the sharepoint but can't read the tables or the data because in JSON how can I get the value inside the metadata
spauth.getAuth(url, {
username:username,
password:password
})
.then(function(options){
console.log(listTitle)
var headers = options.headers;
headers['Accept'] = 'application/json;odata=verbose';
// Pull the SharePoint list items
requestprom.get({
url: url+"/_api/web/lists/getbytitle('Documents')/items(xxxx)",
headers: headers,
json: true
}).then(function(listresponse){
// var items = listresponse.d;
var items = listresponse;
var responseJSON = [];
console.log(items);
解决方案
For SharePoint Online, we could use Graph API to get the value of the excel.
Try this endpoint:
https://graph.microsoft.com/v1.0/sites/domain.sharepoint.com,id,id/drives/drive id/items/item id/workbook
You could take a look at the following blog: Accessing the Excel file content
Test result:
Official document for your reference: Get Worksheet
这篇关于如何在 EXCEL SHAREPOINT 文件 (JSON) 中读取元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文