請問如何將DataSet存到Excel,而不使用COM的方式呢?
Dim conn As OleDb.OleDbConnection
Dim cmd As OleDb.OleDbCommand
Dim MyReader As OleDb.OleDbDataReader
Dim MyData_Set As DataSet = New DataSet("資料來源")
Dim MyTable As New DataTable("人員基本資料")
Dim ConnDbstr As String
Dim selectcmd As String = "select * from [Sheet1$]"
ConnDbstr = "provider=Microsoft.Jet.OLEDB.4.0;" & "data source=" & File_Pitch
& "\" & File_Name & ".XLS;" & "Extended Properties=Excel 8.0;"
conn = New OleDb.OleDbConnection(ConnDbstr)
conn.Open()
cmd = New OleDb.OleDbCommand(selectcmd, conn)
我已將資料建入DataSet中了
要如何將MyData_Set.Tables("人員基本資料") 存到Excel呢?
請指導,謝謝..
--
--
Robbin Lee
http://0rz.tw/e04jM
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.73.247.64