以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 导出图片嵌入表格 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=175657) |
-- 作者:JQKA -- 发布时间:2022/3/14 14:42:00 -- 导出图片嵌入表格 如题,代码如下 可以把图片嵌入进去吗 If e.Book.TempLate = "111" Then If e.region = "table_3" Then Dim ftp1 As new ftpclient ftp1.host="172.16.120.41" ftp1.Account = "admin" ftp1.password = "qw123" If e.DataRow.IsNull("图片") = False Then \'身份证号码是否为空 Dim fls As List(of String) = e.DataRow.Lines("图片") For i As Integer = 0 To fls.count - 1 Dim file As String = "d:\\data\\Desert" & i & ".jpg" If ftp1.Download(fls(i),file) = True Then Dim img As image = getImage(file) If img IsNot Nothing Dim bmp1 As new bitmap(img, 200,200 * (img.height / img.width)) bmp1.save(ProjectPath & "Images\\图片" & i+1 & ".jpg") bmp1.Dispose If fls.count = 1 Then Dim bmp As new bitmap(1,1) bmp.save(ProjectPath & "Images\\图片2.jpg") bmp.Dispose End If End If End If Next Else Dim bmp As new bitmap(1,1) bmp.save(ProjectPath & "Images\\图片1.jpg") bmp.Dispose bmp = new bitmap(1,1) bmp.save(ProjectPath & "Images\\图片2.jpg") bmp.Dispose End If End If End If If FileSys.DirectoryExists("d:\\data") Then \'如果目录C:\\MyFolder存在 FileSys.DeleteDirectory("d:\\data",2,3) \'则删除之 End If |
-- 作者:JQKA -- 发布时间:2022/3/14 14:43:00 -- 就好像excel一样嵌入图片嵌入单元格里面 |
-- 作者:有点蓝 -- 发布时间:2022/3/14 14:51:00 -- 1楼是用到execl模板里的,参考:http://www.foxtable.com/webhelp/topics/2338.htm |