# Import one Excel template in Web Dev and for on click on download that in Perspective

**URL:** <https://forum.inductiveautomation.com/t/import-one-excel-template-in-web-dev-and-for-on-click-on-download-that-in-perspective/100788>\
**Category:** Ignition\
**Tags:** webdev, perspective\
**Created:** [January 13, 2025, 3:06am UTC](https://forum.inductiveautomation.com/t/import-one-excel-template-in-web-dev-and-for-on-click-on-download-that-in-perspective/100788 "2025-01-13T03:06:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nagarathna\_B](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@Nagarathna\_B](https://forum.inductiveautomation.com/u/Nagarathna_B)\
**Post date:** [January 13, 2025, 3:06am UTC](https://forum.inductiveautomation.com/t/import-one-excel-template-in-web-dev-and-for-on-click-on-download-that-in-perspective/100788/1 "2025-01-13T03:06:11Z")

</div>

i am using ignition 8.1.35 version ,i have to imported one excel file in web dev file resource , While uploading that file MIME type is set to `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`  
and in perspective on clicking on the button i would like to download that excel file, so i used the below code

# Define the path to the file resource

filePath = "webdev/fileResources/template.xlsx" # or template.xls

# Trigger the download

system.perspective.downloadFile(filePath, "template.xlsx") # or template.xls  
when i click that button i am able to download the excel file but i am not able to open it. its telling file extension or format is incorrect  
is there any solution

---

<div class="post-metadata">

**Author:** ![Benjamin\_Furlani](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/benjamin_furlani/32/66084_2.png) [@Benjamin\_Furlani](https://forum.inductiveautomation.com/u/Benjamin_Furlani)\
**Post date:** [January 13, 2025, 3:11am UTC](https://forum.inductiveautomation.com/t/import-one-excel-template-in-web-dev-and-for-on-click-on-download-that-in-perspective/100788/2 "2025-01-13T03:11:03Z")

</div>

To start, why do you need the web dev module?

To answer the question you asked, you simply use the `system.perspective.download` function and pass in the filename and byte stream of the excel document.

---

<div class="post-metadata">

**Author:** ![Nagarathna\_B](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@Nagarathna\_B](https://forum.inductiveautomation.com/u/Nagarathna_B)\
**Post date:** [January 13, 2025, 3:18am UTC](https://forum.inductiveautomation.com/t/import-one-excel-template-in-web-dev-and-for-on-click-on-download-that-in-perspective/100788/3 "2025-01-13T03:18:02Z")

</div>

I have an Excel template that contains all the necessary details. Users can refer to this template to understand the required format for importing their Excel files into the application

---

<div class="post-metadata">

**Author:** ![Benjamin\_Furlani](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/benjamin_furlani/32/66084_2.png) [@Benjamin\_Furlani](https://forum.inductiveautomation.com/u/Benjamin_Furlani)\
**Post date:** [January 15, 2025, 3:11pm UTC](https://forum.inductiveautomation.com/t/import-one-excel-template-in-web-dev-and-for-on-click-on-download-that-in-perspective/100788/4 "2025-01-15T15:11:50Z")

</div>

Sorry for the delayed response. Please try and reply by hitting the reply button under the post you are responding to so they get notified.

I think you would just need to do an httpGet of the filepath and then convert that to a bytearray for the system.perspective.download to function properly.
