Is there any ways to set "Open in Teams" as default when user click an excel link?

%3CLINGO-SUB%20id%3D%22lingo-sub-1183622%22%20slang%3D%22en-US%22%3EIs%20there%20any%20ways%20to%20set%20%22Open%20in%20Teams%22%20as%20default%20when%20user%20click%20a%20excel%20link%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1183622%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CBR%20%2F%3ENow%20I%20am%20studying%20how%20to%20building%20a%20bot%20in%20Teams.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20choose%20different%20ways%20to%20open%20it%20when%20using%20Teams.%26nbsp%3B%20By%20clicking%20%22Open%20in%20Teams%22%20or%20open%20it%20in%20a%20pop-up%20browser.%3CBR%20%2F%3EHowever%2C%20I%20don't%20see%20any%20information%20in%20the%20official%20documents%20about%20how%20to%20enable%20it%20when%20developing%20Teams%20Bot.%20For%20example%2C%20a%20bot%20provide%20an%20excel%20file%2Flink%20to%20users%2C%20users%20open%20it%20and%20edit%20it%20in%20Teams%26nbsp%3B%20instead%20of%20opening%20it%20in%20O%26nbsp%3B%20of%20pop-up%20window%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20how%20to%20do%20it%3F%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1183622%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1191129%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20any%20ways%20to%20set%20%22Open%20in%20Teams%22%20as%20default%20when%20user%20click%20an%20excel%20link%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1191129%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F561304%22%20target%3D%22_blank%22%3E%40Jimmy1116%3C%2FA%3E%26nbsp%3BYes%2C%20there%20is%20a%20way%20to%20open%20excel%20file%20inside%20Teams.%20You%20need%20to%20modify%20the%20URL%20of%20the%20excel%20link%20into%20below%20format.%3C%2FP%3E%0A%3CP%3EEx%3A%20if%20your%20file%20URL%20is%20%22https%3A%2F%2Fmy-url%2Fsomeexcelfile%2F%22%3C%2FP%3E%0A%3CP%3EStep%201%3A%20Replare%20%22%2F%22%20with%20%22~2F%22%20in%20the%20ULR%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eupdate%20URL%20should%20look%20like%20%3A%20%22https%3A~2F~2Fmy-url~2Fsomeexcelfile~2F%22%3C%2FP%3E%0A%3CP%3EStep%202%3A%20Create%20team%20viewer%20URL%20with%20below%20format.%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CA%20href%3D%22https%3A%2F%2Fteams.microsoft.com%2F_%23%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2F_%23%2F%3C%2FA%3E%3CSTRONG%3E%3CFILE-TYPE%3E%3C%2FFILE-TYPE%3E%3C%2FSTRONG%3E%2Fviewer%2Fteams%2F%3CSTRONG%3E%3CUPDATED-URL%3E%3C%2FUPDATED-URL%3E%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3EFinal%20URL%20should%20look%20like%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CA%20href%3D%22https%3A%2F%2Fteams.microsoft.com%2F_%23%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2F_%23%2F%3C%2FA%3E%3CSTRONG%3Exlsx%3C%2FSTRONG%3E%2Fviewer%2Fteams%2F%3CSTRONG%3Ehttps%3A~2F~2Fmy-url~2Fsomeexcelfile~2F%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20URL%20works%20for%20other%20file%20format%20as%20well.%20For%20viewing%20PDF%20file%2C%20you%20can%20replace%20%22xlsx%22%20with%20%22pdf%22%20and%20update%20the%20URL%20for%20pdf%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20it%20helps.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent Visitor

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!

1 Reply
Highlighted

@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.