
加好友 发短信
等级:四尾狐
帖子:825
积分:1650
威望:0
精华:0
注册:2021/7/30 8:48:00
|
Post By:2021/9/7 15:45:00 [显示全部帖子]
Dim Book As New XLS.Book("c:\test\订单.xls") Dim Sheet As XLS.Sheet = Book.Sheets(0) Tables("订单").StopRedraw() Dim nms() As String = {"编号","产品","客户","雇员","单价","折扣","数量","日期"} For n As Integer = 1 To Sheet.Rows.Count -1 Dim bh As String = sheet(n,0).Text Dim dr As DataRow = DataTables("订单").Find("编号 = '" & bh & "'") If dr Is Nothing Then '如果不存在同编号的订单 dr = DataTables("订单").AddNew() End If For m As Integer = 0 To nms.Length - 1 dr(nms(m)) = Sheet(n,m).Value Next Next Tables("订单").ResumeRedraw() 这个方法也可以上传图片的吗
|
|