199
Views
9
Comments
Export Excel FIles from Record List but Corrupts.
Question

Hi All,

Currently, I developing a page with export function. I've been trying to export my table record list to excel, it does download the file successfully but when I open the file, it hits "the file is corrupts." My other pages export function goes well, until today I found out all my other pages export to excel function gone corrupted. I only do changes on the page where I currently develop, din't change the code on other pages. Not sure what it affect.

I've been checking on this forum
https://www.outsystems.com/forums/discussion/37222/download-widget-corrupts-excel-file/
but couldn't found a solution.

2025-08-22 10-19-44
Pramod Jain
 
MVP

Hi Gwan,

Which extension are you using to export the table record to excel ? if you are using the Advance excel make sure that you are closing the workbook object before downloading it.


Regards,

-PJ-



UserImage.jpg
Gwen

Hi PJ,

I din't use any extension. I just use the Record List to Excel widget. Below are the screenshot of my flows and mapping.

 

Now I found out another issue which is when I download an excel template also getting file corrupts.

Any idea or solution to fix this? Or is it bug caused in OutSystems Platform?


Thank you.


UserImage.jpg
Gwen

For your information, attached is the corrupted excel file. 

ApprovalEmailReminderLogDetail_05102020184839.xlsx

BusinessArea (1).xlsx

*Edit: I could not attached/upload he corrupted excel file to here as it mentioned 'the file is not valid'.

2025-08-22 10-19-44
Pramod Jain
 
MVP

Hi Gwen,

Please find attached Sample oml , i am able to download the file successfully and is not corrupted.


Regards,

-PJ-



DownlaodExcel.oml
UserImage.jpg
Gwen

Hi PJ,

I managed to download the exported excel file without any corruption from your sample.oml. I did try to develop in my own personal environment it works as normal. Unfortunately, when I download the exported file from my working project for company in Enterprise DEV environment, it show corrupted file.

This happened when I download an excel file without having any Record List To Excel or Excel to Record List.


For this scenario, this happened where I need to export the data from my record list to excel. 

I assumed the problem is from Download Widget. Because I did not done anything to any other pages. Now all my pages that has Download widget had this issue. They worked perfectly fine before I develop new export function.

UserImage.jpg
Abhijeet A

like i want output  (example -when i will search for Amit and click for search button and i will download in excel sheet it should show only amit name

2025-08-22 10-19-44
Pramod Jain
 
MVP

Hi Gwen,

I think what Shingo mentioned can be a reason , could you please check your file extension in resource and if it .xls , change that to a .xlsx file and try again !


Regards,

-PJ-

UserImage.jpg
Gwen

Hi All,

Thanks for help. I managed to found and solved the issue. It is due to an external JavaScript is added in OnBeginWebRequest, that messed up the whole download.


Kindly refer to forum below for solution if any other had encounter the same issue with me,
1. https://www.outsystems.com/forums/discussion/47024/corrupted-files-when-downloading-from-the-database/#Post172045
2. https://www.outsystems.com/forums/discussion/34190/blob-to-pdf/#Post120838 


Thank you!

UserImage.jpg
Maram Al Nuaimi

Step-by-step guide 📌 

How to download your app data into an Excel file sharing this so anyone can apply it easily! 💡📊

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