Public Function InsertPicture() As String
        
 

         Dim oExcel As New Microsoft.Office.Interop.Excel.Application

        Dim obook As Microsoft.Office.Interop.Excel.Workbooks


        Dim oSheet As Microsoft.Office.Interop.Excel.Sheets

        Dim miss As System.Reflection.Missing


        miss = System.Reflection.Missing.Value

        oExcel.Visible = True

        oExcel.DisplayAlerts = False

        obook = oExcel.Workbooks.Open("c:\aa.xls", miss, miss, miss, miss, miss, miss, miss, miss, miss, miss, miss, miss, miss, miss)

        oSheet = obook.Item(1).ActiveSheet.Pictures.Insert("c:\aa.jpg").Select()

 

        Return ""

    End Function

posted on 2008-03-16 14:05  Stym--闫生  阅读(436)  评论(0编辑  收藏  举报