【问题标题】:Performance issues with Infragistics WebExcelExporter.Export(webdatagrid, worksheet) with large data sets具有大型数据集的 Infragistics WebExcelExporter.Export(webdatagrid, worksheet) 的性能问题
【发布时间】:2021-02-10 06:42:10
【问题描述】:

我正在使用Infragistics WebExcelExporter.Export(webdatagrid, worksheet) 导出具有 70000+ 行和 25 列的大型数据表。由于超时,导出失败。有没有其他方法可以使用 Infragistics WebExcelExporter 导出。

如果行数低于 50000,则可以正常工作。

【问题讨论】:

    标签: c# export-to-excel infragistics webdatagrid


    【解决方案1】:

    这绝对是大量的数据。服务器陷入循环或服务器仍在处理请求。我的建议是增加处理数据所需的时间(来自长时间运行的方法),并查看错误是由时间不足还是不定式循环引起的。

    默认回调管理器超时值为 20 秒。您可以使用每个合气道控件引用的受保护的 _callbackManager 对象。要增加 WebDataGrid 超时时间,您可以执行以下操作:

    代码sn-p:

    <script type="text/javascript">
            function Init(sender, eventArgs) {
                sender._callbackManager.setTimeout(60000);
            }
     </script>
    
    
     ...
    <ig:WebDataGrid ID="WebDataGrid1" runat="server" DataSourceID="EmployeesDataSource" 
        Width="100%" DataKeyFields="OrderID">
        <ClientEvents Initialize="Init" />
    

    您是否考虑过将这些数据导出到不同的部分?

    【讨论】:

    • 感谢您的回答。服务器按时返回响应。失败在于 Infragistics 库。如果使用大型数据集失败。后来才知道这是基础设施库的一个已知问题。我用 OpenXML 替换了 infragistics,处理速度非常快。
    猜你喜欢
    • 2019-06-29
    • 1970-01-01
    • 2019-02-09
    • 2021-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多