有看帮助?
#include <Excel.au3>
#include <MsgBoxConstants.au3>
; 创建应用对象并打开示例工作簿
Local $oExcel = _Excel_Open()
If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_PictureAdd 示例", "创建 Excel 应用对象发生错误." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
; 创建新工作簿
Local $oWorkbook = _Excel_BookNew($oExcel)
If @error Then
MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_PictureAdd 示例", "创建工作簿失败." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
_Excel_Close($oExcel)
Exit
EndIf
Local $sPicture = @ScriptDir & "\1.jpg"
_Excel_PictureAdd($oWorkbook, Default, $sPicture, "A2:F24", Default, Default, Default, False)
Local $sPicture2 = @ScriptDir & "\2.jpg"
_Excel_PictureAdd($oWorkbook, Default, $sPicture2, "G2:L24", Default, Default, Default, False)
Local $sPicture3 = @ScriptDir & "\3.jpg"
_Excel_PictureAdd($oWorkbook, Default, $sPicture3, "M2:R24", Default, Default, Default, False)
Local $sPicture4 = @ScriptDir & "\4.jpg"
_Excel_PictureAdd($oWorkbook, Default, $sPicture4, "A25:F49", Default, Default, Default, False)
Local $sPicture5 = @ScriptDir & "\5.jpg"
_Excel_PictureAdd($oWorkbook, Default, $sPicture5, "G25:L49", Default, Default, Default, False)
Local $sPicture6 = @ScriptDir & "\6.jpg"
_Excel_PictureAdd($oWorkbook, Default, $sPicture6, "M25:R49", Default, Default, Default, False)
|