以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 自定路径汇总数据怎么报错 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=17084) |
-- 作者:lpxjw_zyl -- 发布时间:2012/3/3 12:16:00 -- 自定路径汇总数据怎么报错 Dim dlg As New OpenFileDialog End If |
-- 作者:lpxjw_zyl -- 发布时间:2012/3/3 12:18:00 -- Dim dlg As New OpenFileDialog
|
-- 作者:lpxjw_zyl -- 发布时间:2012/3/3 12:50:00 -- Dim dlg As New OpenFileDialog dlg.MultiSelect = True dlg.Filter= "Excel文件|*.xls" If dlg.ShowDialog = DialogResult.OK Then Dim Book As New XLS.Book(dlg.FileName) Dim Sheet As XLS.Sheet = Book.Sheets(0) Dim Names As New List(Of String) For l As Integer = 0 To Sheet.cols.count -1 If Names.Contains(Sheet(0,l).Value)= False Then Names.Add(Sheet(0,l).Value) End If Next For h As Integer = 0 To Sheet.rows.count -1 For ll As Integer = 0 To names.count -1 Tables("学籍").Rows(h)(names(ll)) = Sheet(h+1,ll).Value Next Next Else MessageBox.Show("请选择文件", "提示") End If |
-- 作者:mr725 -- 发布时间:2012/3/3 14:19:00 -- 看看两种表格的行列位置··· |