How to force excel URL to download
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 01:27 PM
I am trying to create a catalog item where I use a variable, Rich Text Label, as a way to provide a template for users when submitting the ticket. The URL points to an .xlsx document that resides on our Teams page. Is there any way within the variable or elsewhere in SNOW to force this to download the document each time instead of opening the Teams page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 04:07 PM
Hi @Brent Cox
I think in ServiceNow, you can't directly control the behavior of how browsers handle URL links, such as opening a Microsoft Teams document. Whether a link opens in the browser or prompts for download depends on the browser's default behavior and the user's settings.
However, Instead of directly linking to the Teams page, you can host the file in a place where you have more control over the behavior. For example, you can upload the .xlsx document as an attachment to the catalog item record and provide a link to download it from there. This ensures that users will always download the file when clicking the link.
Also if you can use a URL Shortener - Some URL shortening services allow you to set a preference for whether a link should open directly or download. However, this may not work with all browsers and might still be subject to the user's settings.
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar