Search code examples
c#razorfile-uploadmicrosoft-teams

Can a MS Teams app (personal tab) open a client's local file?


I would like to develop an MS Teams app that adds a personal tab. Setting up the project worked fine and I can debug it with no problems.

The use-case is to automatically give the results from Windows Forms test sheets back to the students:

  1. User loads the app (tab) and can pick an Excel file (xlsx) from his local harddrive
  2. User clicks on a button "analyse"
  3. The file gets uploaded to the client's web space (I guess somewhere on sharepoint?)
  4. My Teams app (the personal tab) opens the file and sends short chat messages to all users that are found in a column of the first excel sheet.

I am comfortable with C# but I only know the desktop side of things. Is my use-case even possible with a Teams app? Appreciate the help!


Solution

  • Yes that definitely all sounds do-able. For point 3, you could upload either to SharePoint or to the user's OneDrive, depending on how you want to handle it. For point 4, you can look at messaging either the users directly or possibly into the channel - for both of those, I posted an answer yesterday that should be useful (it was a different question, but see my answer) at How to Send Large Text Messages to a User or Channel in Microsoft Teams Using Teams JS SDK v2?