29
Views
12
Comments
Solved
[OutSystems Data Grid Web] ExportExcelButton fails on export
outsystems-data-grid-web
Web icon
Forge asset by OutSystems
Application Type
Traditional Web
Service Studio Version
11.55.25 (Build 64197)
Platform Version
11.32.0 (Build 44177)


When using the ExportExcelButton, from the OutsystemsDataGridWeb forge component it just locks the datagrid and errors out in console.

WijmoJS.js?632256:14 Uncaught ** Assertion failed in Wijmo: Please use JSZip 2.5 to save excel files synchronously. Error

Theres a barebones oml attached that showcases the issue.

DataGridExportExample.oml
2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi David,

I ran into the same problem, but with the reactive version. The error occurred because I was still using the save() method for Excel export. 

The documentation notes that save() works with JSZip 2.5, while saveAsync() requires JSZip 3.0. 

By default OS uses JSZip 3.10.1.


As a workaround you can replace the version of the JSZip. In the screen's javascript property paste the following script:

// 1. Remove the platform’s JSZip 3.x

delete window.JSZip;

// 2. Dynamically load JSZip 2.5.0

(function() {

  var jszip = document.createElement('script');

  jszip.type = 'text/javascript';

  jszip.src  = 'https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js';

  document.getElementsByTagName('head')[0].appendChild(jszip);

})();

You can also check the updated OML I uploaded.

DataGridExportExample.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff

Hello @David Queimado 

This is a known issue well explained by @Mihai Melencu and will be fixed in the next release under code ROU-12042 (for release notes reference).

Cheers,
GM

2022-10-19 00-51-44
Viktar Ramaneika

Hi Gonçalo,

There are two more versions released with the same issue and without a known-issue note. Is there a plan to fix it in the next release?

2022-11-12 11-28-30
Gonçalo Martins
Staff

Can you share a sample with the steps to reproduce using the latest version?

2022-10-19 00-51-44
Viktar Ramaneika

In the right-click Menu the application uses the normal ...features.export.exportToExcel() function which works correctly and uses the default JSZip 3.10.1

But for custom export we use wijmo.grid.xlsx.FlexGridXlsxConverter.save(this._grid.provider, params) function and it does not work with JSZip 3.10.1 and requires JSZip 2.5.0

2022-11-12 11-28-30
Gonçalo Martins
Staff

Could you share a sample oml where weccan reproduced that I would appreciate it? 

2022-10-19 00-51-44
Viktar Ramaneika

Hi Gonçalo,

Please find the OML attached. I have reproduced the current implementation. The Excel export customisation JS node is inside the OnInitialize_Grid action

DataGridIssue.oml
2023-10-16 05-50-48
Shingo Lam

seems like you are js expert @Mihai Melencu :), appreciate your help on many topics

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Viktar Ramaneika 

After looking at your oml, I managed to identify some inconsistencies:

  • Your OML is from the OutSystems Data Grid reactive version, and this post is about the OutSystems Data Grid Web 
  • You mentioned, "There are two more versions released with the same issue and without a known-issue note. Is there a plan to fix it in the next release"
    • This is custom code implemented and supported by you, not by the component;
    • The export from the product works perfectly, and without issues, so your statement isn't correct
  • The issue is in your code where you're using the non-async version of the save method, and you should be using saveAsync as shown below:
2022-10-19 00-51-44
Viktar Ramaneika

Hi @Gonçalo Martins 

Thank you for the detailed response. I used this post because a proper discussion had already started here, and Mihail mentioned: “I ran into the same problem, but with the reactive version”

Thank you for the resolution recommendation. I will replace the function


Sorry for the incorrect statement. It would be good to mention this update as a potentially breaking change in the release notes:

  • ROU-10868 / RPM-5077 - Fixed a security vulnerability. CVSSv3.1 score 7.3 (High).
    Updated an internal dependency from JSZip to version v3.10.1 and, because of that, the internal method for exporting to XLSX in Wijmo FlexGrid now needs to use an asynchronous method (saveAsync instead of save).
2022-11-12 11-28-30
Gonçalo Martins
Staff

We think the release note has all the information needed, and that makes sense for the product (this isn't something that should be on the release, but we're already aware of some scenarios where we want to provide awareness). 
Custom code done by the developers is not supported, so it is not considered a breaking change on the product since it's the developer's responsibility to maintain it.

Cheers

UserImage.jpg
David Queimado

Thanks, that worked

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