C# export to excel from sql server

£可爱£侵袭症+ 提交于 2019-12-11 01:49:13

问题


In my C# windows application, I am exporting sql server data to excel on remote drive. But it is too slow. However, if I export data to excel in the local drive, it is fast.

How can I increase the time if I want to export data to remote drive?

Thanks in advance...


回答1:


Export to a temp folder on the local machine, copy it to the network and then delete the file from the temp folder. You could even do the copy and delete on a separate thread so the UI's not blocked.




回答2:


If it is an option for you, export to the local drive and then copy/move the exported file to the remote drive.



来源:https://stackoverflow.com/questions/2401370/c-sharp-export-to-excel-from-sql-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!