摘要
在用Visualbasic.net编程中,经常需要把数据按照一定的报表格式输出。为了在的应用程序中输出复杂的报表,我们可以先用Excel程序制作一个报表模板文件,在工程中添加Excel外部程序引用,然后定义和创建Excel对象实例,最后通过编程的方法把数据库表中的数据填入报表模板文件中的相应的表格单元。这样,可以创建适合中国人的复杂报表,并且可以方便地打印输出。
During Visual basic.net programming, we often need to export the d ata according to certain report forms format. In order to export the complicated report forms in application program ,we can make the template file of a report forms with the excel program first; Add the outside to quote in the project; the n define and establish object's instance. At last, we fill in the data in the d ata-base table in a template file in corresponding cell through the programming method . So we can establish suitable Chinese and complicated report forms and c an export through printer conveniently.