ExtJs4 在IE中从javascript生成Excel文件得到我:“传递给系统调用的数据区域太小”

ExtJs4 Generating an Excel file from javascript in IE gets me:"the data area passed to a system call is too small"

本文关键字:系统调用 数据 数据区 区域 javascript 中从 IE 生成 Excel 文件 ExtJs4      更新时间:2023-09-26
我已经为 ExtJs 4

实现了这个 UX(它从 ExtJs 4 网格或存储中生成一个 Excel 文件)

http://druckit.wordpress.com/2013/10/26/generate-an-excel-file-from-an-ext-js-4-grid/#comment-982

它在Chrome中完美运行,但是在任何版本的IE中,我不断收到此错误" 传递给系统调用的数据区域太小"

这是似乎是问题的代码片段,完整的代码在上面的链接中。

    var el = Ext.DomHelper.append(gridEl, {
        tag: "a",
        download: title + "-" + Ext.Date.format(new Date(), 'Y-m-d Hi') + '.xls',
        //download: 'descarga.xls',
        href: location
    });
    el.click();    //this line seems to be causing the error
    Ext.fly(el).destroy();   
}

我知道有downlodify和其他选项(如服务器端生成),但目前对我来说不是一个选择。

我有机会让这个用户体验在IE中工作吗?

谁能指出我正确的方向?

谢谢。

使用列出的方法不适用于 IE,因为 IE 的限制为 2083 个字符。如果您在此小提琴https://fiddle.sencha.com/#fiddle/17j中调试代码,您会注意到位置变量远远超过 5000 个字符,并且在 IE 中也会失败。我假设如果您也调试代码,问题是一样的。