国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦>學(xué)習(xí)電腦>工具軟件>辦公軟件學(xué)習(xí)>Excel教程>Excel基礎(chǔ)>

    vb讀取excel數(shù)據(jù)的教程

    時間: 業(yè)華773 分享

      在Excle中錄入好數(shù)據(jù)以后,可能會需要用VB進(jìn)行讀取Excle數(shù)據(jù),具體該如何讀取數(shù)據(jù)呢?下面是學(xué)習(xí)啦小編帶來的關(guān)于vb讀取excel數(shù)據(jù)的教程,希望閱讀過后對你有所啟發(fā)!

      vb讀取excel數(shù)據(jù)的教程:

      Private Sub Form_Load()

      Text1.Text = App.Path & "3.xls"

      Text2.Text = App.Path & "3.mdb"

      Text3.Text = "sheet1"

      Text4.Text = "sheet1"

      Data1.DatabaseName = App.Path & "3.mdb"

      End Sub

      Private Sub Command1_Click()

      Dim db As Database

      Dim sheet As String, excelpath As String, AccessPath As String, AccessTable As String

      AccessPath = Text2.Text '數(shù)據(jù)庫路徑

      excelpath = Text1.Text '電子表格路經(jīng)

      AccessTable = Text4.Text '數(shù)據(jù)庫內(nèi)表格

      sheet = Text3.Text '電子表格內(nèi)工作表

      Set db = OpenDatabase(excelpath, True, False, "Excel 5.0") '打開電子表格文件

      SQL = ("Select * into [;database=" & AccessPath & "]." & AccessTable & " FROM [" & sheet & "$]")

      db.Execute (SQL) '將電子表格導(dǎo)入數(shù)據(jù)庫

      Data1.RecordSource = "sheet1"

      Data1.Refresh

      DBGrid1.Refresh '顯示電子表格導(dǎo)入到數(shù)據(jù)庫的數(shù)據(jù)

      End Sub

      上面的是把EXCEL讀取到數(shù)據(jù)庫中,你做點(diǎn)修改就行了.一個Data控件.

    看了vb讀取excel數(shù)據(jù)的教程還看了:

    1.如何利用excel進(jìn)行數(shù)據(jù)分析的教程

    2.如何用excel進(jìn)行數(shù)據(jù)分析的教程

    3.如何用excel統(tǒng)計(jì)文本數(shù)據(jù)的教程

    4.如何快速提取出Excel2010括號內(nèi)的數(shù)據(jù)信息

    5.數(shù)據(jù)怎么導(dǎo)入excel的教程

    6.excel2013加載數(shù)據(jù)分析模塊的教程

    7.excel2013怎么實(shí)現(xiàn)數(shù)據(jù)的快速分析

    696551