Feb 19 2020 07:02 PM - edited Feb 20 2020 06:48 PM
Hi
Now I am studying how to building a bot in Teams.
I can choose different ways to open it when using Teams. By clicking "Open in Teams" or open it in a pop-up browser.
However, I don't see any information in the official documents about how to enable it when developing Teams Bot. For example, a bot provide an excel file/link to users, users open it and edit it in Teams instead of opening it in O365 of pop-up window
Does anyone know how to do it?
Thanks!
Feb 24 2020 08:18 AM
@Jimmy1116 Yes, there is a way to open excel file inside Teams. You need to modify the URL of the excel link into below format.
Ex: if your file URL is "https://my-url/someexcelfile/"
Step 1: Replare "/" with "~2F" in the ULR
update URL should look like : "https:~2F~2Fmy-url~2Fsomeexcelfile~2F"
Step 2: Create team viewer URL with below format.
https://teams.microsoft.com/_#/<File-Type>/viewer/teams/<updated-URL>
Final URL should look like
https://teams.microsoft.com/_#/xlsx/viewer/teams/https:~2F~2Fmy-url~2Fsomeexcelfile~2F
This URL works for other file format as well. For viewing PDF file, you can replace "xlsx" with "pdf" and update the URL for pdf file.
Hope it helps.