Having Matlab import data from SharePoint
显示 更早的评论
I have a line in my code where data is imported, and I wantto add a directory that can import the data from SharePoint so that anyone who is in the sharepoint can use the same code without having to change the directory. I can't seem to figur eout how to do this without adding a shortcut, becaus enot everyone would have the same shortcut. If anyone could help with how I can set up the import so that anyone can use the code that would be great! Thanks!
回答(1 个)
Garmit Pant
2024-8-8
0 个投票
Hi Elyse
You can use Web Services with MATLAB to access SharePoint files using either the SOAP API or the RESTful API.
MATLAB can communicate with services that use WSDL Documents. The ‘matlab.wsdl.createWSDLClient’ function creates a MATLAB class that allows you to use the server APIs. The function converts the server APIs to a MATLAB class and creates a class folder in the current folder. The class folder contains methods for using the server APIs. Create an object of the class whenever you want to use the operations of the service. Use the methods of the object to run applications on and exchange data with the server.
The following resources will help you get started with using SOAP API with MATLAB to access SharePoint files:
- Documentation of Web Services with MATLAB using WSDL: https://www.mathworks.com/help/matlab/call-wsdl-web-services.html
- Documentation of SOAP API for SharePoint containing access points: https://learn.microsoft.com/en-us/sharepoint/dev/general-development/accessing-the-soap-api
The other method is to use RESTful API. You can use MATLAB functions like “webread” and “websave” to interface with RESTful.
The following resources will help you get started with using RESTful API with MATLAB to access SharePoint files:
- MATLAB “webread” function to read content from RESTful web services: https://www.mathworks.com/help/matlab/ref/webread.html
- SharePoint REST operations: https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph
- Code-along video guide to using RESTful API to communicate with SharePoint using MATLAB: https://blogs.mathworks.com/videos/2023/05/26/using-the-sharepoint-restful-api-to-delete-past-versions-of-a-file/
I hope you find the above explanation and suggestions useful!
类别
在 帮助中心 和 File Exchange 中查找有关 Measurements and Spatial Audio 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!