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


The correct syntax should probably be (note the anonymous hash ref):
$curSheet->Rows("2:2")->Insert({Shift => 'xlDown'});
However, I've tried this and it doesn't work. I don't know why, perhaps xlDown is superfluous in the context of a row range.

As a workaround, if you use the Insert() method without parameters it will give the desired effect of shifting the rows down:

$curSheet->Rows("2:2")->Insert();


Update: bmann got it below, ++. In addition to the hashref xlDown is an imported constant and shouldn't be quoted. The following works:
$curSheet->Rows("2:2")->Insert({Shift => xlDown});

--
John.