http://qs321.pair.com?node_id=386674


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

Rows("1:1").Select Selection.Copy Rows("2:2").Select Selection.Insert Shift:=xlDown
This code was generated from a macro I recorded in excel. It selects Row1, copy's it, selects Row2, and finally pastes the copied Row1 into Row2 shifting all the other rows down (right click, select Insert Copied Cells). For an example, imagine that the spreadsheet looks like this :
1: Cell1, Cell2, Cell3 2: Data1, Data2, Data3 3: Foo01, Foo02, Foo03
After the macro runs you will have :
1: Cell1, Cell2, Cell3 2: Cell1, Cell2, Cell3 3: Data1, Data2, Data3 4: Foo01, Foo02, Foo03
This is what I am trying to achieve. In addition, I feel like I'm working blind. Does anyone know of a guide to OLE and how to use it with perl? The Win32::OLE docs are great, but I'm having a hard time figuring out how to use all of the objects that I find in the Visual Basic Object View and the ActiveState OLE-Browser.