Excel是最常用的报表软件之一,它功能强大、使用广泛。Windows程序开发中将数据导成Excel报表,符合人们的操作习惯。虽然从VS.net平台生成Excel报表并不是一件困难的事,但还存在一些需要注意的问题。首先介绍了在VS.net环境下从数据库将数据导入Excel的方法,而后针对改善用户体验,避免用户界面出现延迟的现象,讨论和介绍了BackgroundWorker控件的使用方法,以及如何利用垃圾回收机制立即释放所占用的资源。以上方法和技巧在开发VS.net信息管理系统中具有很高的实用价值。
Excel is one of the most popular reporting software.It has various functions and is widely used.Importing data into Excel with the Windows program is in line with people's operating habits.Although it's not difficult to have an Excel reporting form on the VS.net platform,there are still some aspects that deserves attention.Firstly the approach to import data from database to Excel on VS.net platform is described,then the use of BackgroundWorker control according to users' experience is introduced in order to avoid the phenomenon of interface delay.How to immediately release the occupied resources by the garbage collection mechanism is also discussed.The above mentioned approaches and techniques in the development of information management system on VS.net platform are of high practical value.