agroman has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to get the following VB code to run with Win32::OLE.
Here's code I'm currently trying to use and the errors that are returned.Rows("1:1").Select Selection.Copy Rows("2:2").Select Selection.Insert Shift:=xlDown
I've tried several different ways of trying to call the Insert function, with no success. What am I doing wrong?my $Workbook = $Excel->Workbooks->Open({Filename=>"test.xls"}); my $curSheet = $Workbook->Worksheets(1); $curSheet->Rows("1:1")->Select; $curSheet->Rows("1:1")->Copy; $curSheet->Rows("2:2")->Select; $curSheet->Rows("2:2")->Insert(Shift => 'xlDown'); OLE exception from "Microsoft Office Excel": Unable to get the Insert property of the Range class Win32::OLE(0.1701) error 0x800a03ec in METHOD/PROPERTYGET "Insert" at C:\test.pl line 6
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Inserting copied rows in Excel using Win32::OLE
by bmann (Priest) on Aug 29, 2004 at 00:53 UTC | |
Re: Inserting copied rows in Excel using Win32::OLE
by jmcnamara (Monsignor) on Aug 29, 2004 at 00:10 UTC | |
Re: Inserting copied rows in Excel using Win32::OLE
by guha (Priest) on Aug 29, 2004 at 00:01 UTC | |
by agroman (Initiate) on Aug 29, 2004 at 00:34 UTC | |
by guha (Priest) on Aug 29, 2004 at 10:44 UTC | |
Re: Inserting copied rows in Excel using Win32::OLE
by doowah2004 (Monk) on Aug 31, 2004 at 15:16 UTC |
Back to
Seekers of Perl Wisdom