I have an AngularJs application and I am importing data from excel sheet. Now I have a Template which needs to be used for importing.
Please help me how do I serve the excel template for download using Angularjs.
Till now: I have a folder in the application called excel-template and in the UI i have provided <a href="excel-template/excel-template.xlsx">Download</a>
.
It downloads the files but when I open it, it says that it is corrupted.
Thanks in advance.
You can use the anchor tag to serve excel template for download. Make sure the path is correct.
<a target="_self" href="excel-templates/XYZ.xlsx" download="XYZ.xlsx"><span>Download Template</span></a>