16
Views
8
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.

mvp_badge
MVP
Rank: #56

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-



Rank: #4623

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'.

mvp_badge
MVP
Rank: #56

Hi Gwen,

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


Regards,

-PJ-



DownlaodExcel.oml

mvp_badge
MVP
Rank: #56

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-

Rank: #4623

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!