86
Views
1
Comments
Solved
Download an Excel file from API directly

I am working on a solution where need to download entity data in excel file.

I know it is straightforward to use Entity to Excel and Download widget.

But do not want to use the download widget as it downloads the whole file first and then gives it to the browser.

I want to create a solution where download starts immediately in browser side and we see the progress like how we download anything from the web, see the below image.




I have achieved a similar solution by exposing an API and returning the file from API. calling that API from a hidden link click.

I am able to download the file, but that file is a binary file that is not an excel file, if I manually change the extension of the file to xlsx it works. 

How I can convert the binary to excel before returning it to the consumer?

You can see my implementation here as well as attaching the OML file.

https://personal-plkg8gex.outsystemscloud.com/Test1/Download





Test1.oml
2026-01-19 15-49-48
Ankit Gangrade
Champion
Solution

I got the Answer by myelf 

I used 

document.getElementById($parameters.Link).download = "filename.xlsx"


It worked

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.