以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助] 如何合并带有图片的excel表格?? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=31742) |
-- 作者:fengyungongzi -- 发布时间:2013/4/19 16:56:00 -- [求助] 如何合并带有图片的excel表格?? 如何合并带有图片的excel表格?? |
-- 作者:fengyungongzi -- 发布时间:2013/4/19 17:01:00 -- 导入excel 表格的代码为:Dim dlg As New OpenFileDialog dlg.Filter= "Excel文件|*.xls;*.xlsx" If dlg.ShowDialog = DialogResult.Ok Then \'MessageBox.Show("你选择的是:" & dlg.FileName,"提示") Dim Book As New XLS.Book(dlg.FileName) Dim Sheet As XLS.Sheet = Book.Sheets(0) Dim colNames As New List(Of String) For i As Integer = 0 To sheet.Cols.Count - 1 colNames.Add(sheet(0, i).Text) Next Dim dt As DataTable = DataTables("管理处文件") For i As Integer = 1 To sheet.Rows.Count - 1 If dt.Find("序号 = \'" & sheet(i, 0).Text & "\'") Is Nothing Then Dim ndr As DataRow = dt.AddNew For j As Integer = 0 To sheet.Cols.Count - 1 ndr(colNames(j)) = sheet(i, j).Text Next End If Next End If 可是 如果字段为图片,其它字段能导入,带有图片的字段,图片列就为空了,导入不了图片列。
|
-- 作者:Bin -- 发布时间:2013/4/19 17:03:00 -- http://www.foxtable.com/help/topics/1149.htm |