Forum Discussion
RedFra497
Nov 02, 2023Copper Contributor
Teams App how to edit an online Excel File in a Sharepoint site via nodejs
Hi guys, i'm new to this.
i need to make a Teams App via vscode for my team that reads (already done) and edits an online Excel file on a Sharepoint site. 'til now i'm using some packages like xlsx, pnp/sp and spfx for reading the file, but now i'm blind on writing this file and save it online. what should i do? are some authentication settings and implementations needed? which packages should i use to accomplish this?
1 Reply
Sort By
- Prasad_Das-MSFT
Microsoft
To edit an online Excel file on a SharePoint site, you will need to use the Microsoft Graph API.
-
Authentication: Before you can call the Graph API, you need to authenticate your app. You can use the Microsoft Authentication Library (MSAL) for this. MSAL is a unified library that helps you to authenticate users and get tokens to call Microsoft APIs.
-
Permissions: You need to set the correct permissions in your app registration in Azure AD. For editing Excel files, you need the
Files.ReadWrite
permission. -
Call the Graph API: Once you have the token, you can call the Graph API to edit the Excel file. The Graph API provides a Excel REST API that you can use to edit Excel files.
- Deploy your app: Once you have implemented the functionality to edit the Excel file, you can deploy your app to Teams. You can use the Teams Toolkit to deploy your app to Teams.
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
-