<?xml version="1.0" encoding="windows-1252"?>
<node id="819196" title="Re: Adding pictures to Excel" created="2010-01-23 11:04:29" updated="2010-01-23 11:04:29">
<type id="11">
note</type>
<author id="33341">
Albannach</author>
<data>
<field name="doctext">
You can add a picture so that the top-left of the image is in the top left of the active cell. You were actually very close in your attempt.  I've tested that the following works:
&lt;code&gt;
use strict;
use warnings;
use OLE;
use Win32::OLE::Const "Microsoft Excel";

my $excel = Win32::OLE-&gt;new('Excel.Application');
$excel-&gt;{Visible} = 1; 
my $workbook = $excel-&gt;Workbooks-&gt;Add;
my $sheet    = $workbook-&gt;Sheets(1);

my $path = 'c:/images/';
$sheet-&gt;Range('a1')-&gt;Activate;
$sheet-&gt;Pictures-&gt;Insert($path.'Img1.jpg'); # top-left of pic in active cell

$sheet-&gt;Range('f10')-&gt;Activate;
$sheet-&gt;Pictures-&gt;Insert($path.'Img2.jpg'); # top-left of pic in active cell
&lt;/code&gt;
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-33341"&gt;
&lt;p&gt;--&lt;br&gt;
I'd like to be able to assign to an luser
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
819178</field>
<field name="parent_node">
819178</field>
</data>
</node>
