Posted 3 August 2022, 6:30 pm EST
Hi,
When I export grid with a huge amount of columns (10.000) but only 50 rows, event onProgress rises only two times when exporting rows (25% and 51%).
This is unacceptable, becouse it gives the impression that the process was frozen.
See the function FlexGridXlsxConverter._saveContentToWorksheet in wijmo.grid.xlsx.js, event is raised every 20 rows, but not more often than every 100 ms
FlexGridXlsxConverter._saveContentToWorksheet = function(e, l, t, o, r, n, s, i, a, u, d, c, f, h, m, p, x) {
for (var g = this, v = u ? 20 : 200, _loop_1 = function(_) {
if (e && e.cancelled) return {
value: void 0
};
[b] if (l && _ - o > v && Date.now() - t > 100) { [/b]
setTimeout((function() {
if (!e || !e.cancelled) {
p(_);
g._saveContentToWorksheet(e, l, Date.now(), _, r, n, s, i, a, u, d, c, f, h, m, p, x)
}
}), 0);
return {
value: void 0
}
}
I suggest that the event should be raised not more frequently than every 100ms and not less than every 1 sec
FlexGridXlsxConverter._saveContentToWorksheet = function(e, l, t, o, r, n, s, i, a, u, d, c, f, h, m, p, x) {
for (var g = this, v = u ? 20 : 200, _loop_1 = function(_) {
if (e && e.cancelled) return {
value: void 0
};
//Modified by ARQ 03.08.2022
var elapsedTime = Date.now() - t;
if (l && ((_ - o > v && elapsedTime > 100) || elapsedTime > 1000)) {
setTimeout((function() {
if (!e || !e.cancelled) {
p(_);
g._saveContentToWorksheet(e, l, Date.now(), _, r, n, s, i, a, u, d, c, f, h, m, p, x)
}
}), 0);
return {
value: void 0
}
}