Foxtable(狐表)用户栏目专家坐堂 → 导入问题。求助。。


  共有1906人关注过本帖树形打印复制链接

主题:导入问题。求助。。

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/5/27 10:51:00 [显示全部帖子]

参考代码

 

Dim dlg As new OpenFileDialog
If dlg.ShowDialog = DialogResult.OK Then
    Dim book As new XLS.Book(dlg.FileName)
    Dim sheet As XLS.Sheet = book.Sheets(0)
    For i As Integer = 0 To sheet.Rows.Count-1
        If sheet(i ,1).Text = "已缴合计" Then
            Dim yj_10 As String = sheet(i, 10).text
            Dim yj_11 As String = sheet(i, 11).text
            Dim yj_16 As String = sheet(i, 16).text
            Dim yj_17 As String = sheet(i, 17).text
            msgbox(yj_10 & " " & yj_16)
           
            Dim qj_10 As String = sheet(i+1, 10).text
            Dim qj_11 As String = sheet(i+1, 11).text
            Dim qj_16 As String = sheet(i+1, 16).text
            Dim qj_17 As String = sheet(i+1, 17).text
            msgbox(yj_10 & " " & yj_16)
            Dim xm As String = sheet(i-4, 1).text
           
            msgbox(xm.SubString(3))
        End If
    Next
End If


 回到顶部