Insert an image in Excel [message #72406] |
Tue, 31 August 2010 13:01 |
Maher
Messages: 12 Registered: September 2005
|
Junior Member |
|
|
I am interested in inserting an image into Excel spread sheet,
something like
;================
Pro IDL_Write_Excel_Col, FILENAME=FileName
; Create an instance of an Excel Application Object
oExcel = obj_new("IDLcomIDispatch$PROGID$Excel_Application")
if ~oExcel then return
; Set this property to 0 to hide the Excel Application
oExcel->SetProperty, visible=1
; Obtain a reference to the workbook object and add new
oExcel->GetProperty, Workbooks=oWkbks
oWkbks->Add
oWkbks->GetProperty, 'Book1', Item=oBookData
; Get a reference to the sheets collection
oBookData->GetProperty, Sheets=oSheets
; Parmamerized property - props can return a value
; (this syntax used in collections) - It's a COM detail.
oSheets->GetProperty, 'Sheet1', Item=mySheetObj
; Obtain a reference to the range object with defined cell(s)
mySheetObj -> GetProperty, 'A1', range = myRangeObj
;myRangeObj->select
; Set a value on the currently selected range
myRangeObj->SetProperty, 'select', value='From IDL'
;===========
but an image, any ideas?
Thanks
Maher
|
|
|