以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  WorkSheet怎样插入图片  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=186982)

--  作者:lianghanyu
--  发布时间:2023/6/12 19:36:00
--  WorkSheet怎样插入图片
Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\\12.xls")
Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
Dim Rg As MSExcel.Range = Ws.Range("A1") \'以这个指定的单元格为基准
Rg.EntireColumn.Insert(MSExcel.XlInsertShiftDirection.xlShiftToRight) \'在基准单元格左边插入一列
Dim Rs As MSExcel.Range = Ws.Range("A1:A12") \'调整的是指定单元格的大小
Rs.RowHeight = 80 \'行高40磅
Rs.ColumnWidth = 15 \'列宽20磅
Wb.WorkSheets(1).range("A2").Value = New XLS.Picture(GetImage("c:\\Foxtable.Ico"))
App.Visible = True


为什么不能插入图片?

--  作者:有点蓝
--  发布时间:2023/6/12 20:20:00
--  
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=147456&replyID=61001&skin=1