http://www.perlmonks.org?node_id=386668


in reply to Inserting copied rows in Excel using Win32::OLE

It is not entirely clear to me what you are trying to achieve. Your use of the Copy method and node title indicates that you want PasteSpecial instead of Insert which just inserts a new empty row before the Range.

Furthermore the value of the Shift property should really be xlShiftDown.

It is not possible from your example to infer how you initialize your Application object and how the Excel constants are imported.

Also I think that the argument of the Rows method should be

$curSheet->Rows(2)->Select;
instead.

Anyway HTH somewhat.