首页 相关文章 VB.NET 导出数据到EXCEL中

VB.NET 导出数据到EXCEL中

  ----------VB.NET 导出数据到EXCEL中-------------

  在引用当中引入Microsoft Excel 11.0 Object Library

  

Dim oExcel As New Excel.ApplicationDim obook As Excel.WorkbookDim oSheet As Excel.WorksheetDim DataArray(2000, 2000) As Integerobook = oExcel.Workbooks.Open("c:\1.xls")oSheet = obook.Worksheets(1)oSheet.Name = "ok"Dim myAdapter As New OleDb.OleDbDataAdapter("select * from list", Module1.dbConn)Dim mydataset As New DataSetmyAdapter.Fill(mydataset, "list")DataGrid1.DataSource = mydataset.Tables("list")Dim i As IntegerDi...[ 查看全文 ]

2016-02-19 标签:

VB.NET 导出数据到EXCEL中的相关文章

手机页面
收藏网站 回到头部