简体   繁体   中英

Why is there performance difference in .NET Target framework(3.5 and 4) while using oleDB to export data to excel?

I am working on a project which involves writing data to excel file using oleDB. When I use .NET Framework 3.5 client Profile as Target framework I get the whole process completed in 2-3 seconds, but setting the Target framework as .NET Framework 4 doubles the processing time that is, it now takes 5-6 seconds and I have no clue why this is happening.

使用哪个.net框架都没有关系,使用哪个版本的Microsoft.Office.Interop.Excel无关紧要,Microsoft.Office.Interop.Excel有两个版本,一个是14.0,第二个是12.0,您可以切换到任何版本,然后重新检查是否解决了问题,您需要通过在解决方案资源管理器中单击“引用”选项卡来删除Microsoft.Office.Interop.Excel的所有先前引用,然后通过右键单击您的项目并添加来添加新引用参考和.net选项卡中尝试搜索Microsoft.Office.Interop.Excel。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM