摘要:
1、首先在“解决方案”中的“项目”中的“引用”上点右键,引入COM组件中的EXEL组件,如下图所示:(版本可能不一样,这不影响,我安装的是OFFICE 2003)
2、在程序的开始,添加如下语句:
Imports Microsoft.Office.Interop
3、建立一个新的过程函数输出到EXCEL中:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim myexcel As New Excel.Application
myexcel.Visible = True
myexcel.Workbooks.Add()
Dim col As Integer
Dim row As Integer
Dim col1 As Integer
阅读全文
posted @ 2005-09-12 10:47 yunbo 阅读(4492) 评论(3) 推荐(0) 编辑