将记录从Access表导出到Excel工作表 [英] Export Records from Access table to Excel Sheet
本文介绍了将记录从Access表导出到Excel工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
全部,
我正在Visual Studio 2010中开发一个VB应用程序.并通过数据网格视图从Access Table中读取记录.现在,我需要将访问记录中的记录导出到excel工作表中,用户只希望将该记录导出到excel工作表中的记录数即可.
在这里,我提供了用于从数据网格视图显示记录的代码
Hai All,
I am developing one VB Application in Visual Studio 2010. And readings the records from Access Table via Data Grid View. Now i need to export that records from access table to excel sheet That to how many records user wanted only that records has been export to excel sheet.
Here i am giving the code that i am using to display the records from data grid view
cnnOLEDB.ConnectionString = strConnectionString
'MsgBox(strConnectionString)
cnnOLEDB.Open()
'Timer1.Enabled = True
Dim dt1 As New DataTable()
dt1.Clear()
Dim adp As New OleDb.OleDbDataAdapter("SELECT TOP 10 * FROM SMSDATA1DB ORDER BY Date_Time DESC", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & System.Environment.CurrentDirectory & "\SMSDB.mdb")
adp.Fill(dt1)
adp.Dispose()
DGView.DataSource = dt1
任何机构都请帮助将记录导出到Excel表PLZZZZZZZZZZZZZ ..
Any body please help to export records to excel sheet PLZZZZZZZZZZZ................
推荐答案
^ ]
浏览此链接...:)
http://www.mikesdotnetting.com/Article/79/Import-Data-From-Excel-to-Access-with-ASP.NET[^]
Go Through this link......:)
导出到Excel使用VB.Net [ ^ ]
该链接将对您非常有帮助....:)
Export to Excel using VB.Net[^]
This link will be very helpful to you....:)
这篇关于将记录从Access表导出到Excel工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文