Yes, it is possible to read, store, and retrieve data from an Excel spreadsheet stored in a SharePoint site within a WPF application. Use the SharePoint Client Object Model to authenticate and download the file into a stream. Use EPPlus or another library to open the Excel file and retrieve the data.
Is it possible to read/store/retrieve data from Excel spreadsheet from Share point site to WPF application?
Hi,
I have connected to Share Point site referring the following blog: https://www.c-sharpcorner.com/article/sharepoint-csom-for-net-standard/
I have created a sample test spreadsheet in the Documents Library named *testSpreadSheet.xlsx
*
I have a quite a few columns in it say: Employee.No, Name, Age, Designation, Department.
Is it possible to retrieve a record like if I provide name of an employee in the C# code and read that record?
Also, If name of the employee is provided, Get the Designation of the employee?
I know, this is easier with Share Point List or SQL database, but I have a requirement where I wanted to read data from Excel spreadsheet that is stored in Share point. Any blog or documentation would be helpful!
Thanks in Advance!
Developer technologies Windows Presentation Foundation
Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office Excel For business Windows
Developer technologies .NET Other
Developer technologies C#
1 additional answer
Sort by: Most helpful
-
RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
2024-08-21T06:05:43.0266667+00:00 Hi @Lakshmanan B,
Per my research, there is no such function to read excel data in SharePoint by CSOM currently. AS a workaround, I would recommend you to use Graph api. You could refer to the following api
https://graph.microsoft.com/v1.0/me/drive/items/{id}/workbook/ https://graph.microsoft.com/v1.0/me/drive/root:/{item-path}:/workbook/
Here is the document for reference
https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.