Friday, 26 February 2016

Excel:Storing Image to Excel file using Vbscript

Dim oExcel, oWB, oSheet,
Set oExcel=CreateObject("Excel.Application")

Set oWB=oExcel.Workbooks.Open("C:\Users\Sunshine\Desktop\myframework.xlsx")
Set oSheet=oWB.WorkSheets("data") 'Above Workbook has sheet named "data"

oExcel.Visible=TRUE

oSheet.Shapes.AddPicture "C:\Users\Sunshine\Desktop\ritu.jpg", True, True, 100, 100, 70, 70
   
   
oWB.Save
oWB.Close
Set oExcel=Nothing
 Set oExcel=Nothing

No comments:

Post a Comment

Spring Boot : Exception Handler 14