in reply to Excel: is there a way to set a background picture using Perl?

If you're prepared to use Win32::OLE, it's quite simple:

use strict; use warnings; use Win32::OLE; my $xl = Win32::OLE->new('Excel.Application'); $xl->{Visible} = 1; my $wb = $xl->Workbooks->Add; for my $nSht (2..$wb->Sheets->{Count}) { $wb->Sheets(2)->Delete; } my $filename = 'x:\data\internet-memes-hopscotch-accepted.jpg'; # Make + this whatever you want $wb->sheets(1)->SetBackgroundPicture({Filename => $filename});

If not, I hope this gives some clue as to what to look for in modules I don't use.

Regards,

John Davies

Replies are listed 'Best First'.
Re^2: Excel: is there a way to set a background picture using Perl?
by Darkwing (Scribe) on Feb 21, 2019 at 07:27 UTC
    Thanks. This works for me.