Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to Provide an Excel Template Download in Service Catalog (Same Window)

Sachin Gavhane
Giga Guru

Hi Everyone,

I need to provide an Excel template for end users to download from a Service Catalog item.

I would like to display a catalog variable labeled “Download the Excel Template”, and when users click it, the file should download in the same window (not open a new tab).

Could you please advise:

  • Which type of catalog variable should I use?

  • What is the best way to attach and reference the Excel file?

  • How can I configure it so the download works smoothly in the same window?

Thank you in advance for your guidance!

__________________________________
I tried using variable of type URL / Rich text label but could not achieve the above requirement.
Somewhere i ready variable of type Macro -- but i am unable to see variable of type Macro


_______________________________________________________________________

Requesting help 




2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron

@Sachin Gavhane 

Couple of approaches

1) Add file to your catalog item, use Rich Text Label variable and add the link to that sys_attachment record

55.png

search in sys_attachment and grab that record sysId

55.png

In variable click and add link and add that sysId by forming URL

55.png

55.png

Output:

55.png

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

@Sachin Gavhane 

yes that's any browser behavior. Since it's trying to open in same tab and if variables are populated then this will happen.

Your requirement is just to download the file and it will be downloaded then why not give target as _blank

I tried with variable of type URL and seems it's working try that

give default value as the relative URL

55.png

Output

variable of type URL showing file.gif

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Tanushree Maiti
Tera Sage

Hi @Sachin Gavhane 

You can achieve it two ways.

 

1)Easiest one - Add excel file to sys_attachment.

Create an Attachment type variable  and configure like given below and link that sys_attachment path

 

Screenshot 2026-02-24 150147.jpg

 

Or

 

2) Using Macro (Type Custom)

 

Enable a variable in catalog item to download exce... - ServiceNow Community

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: