R
Richard S Beckett
Guys,
I want to be able to work out how to do things in excel by myself, but I
don't know how to convert between the macro syntax, and that required in
perl modules.
The 3 things I want to do currently are:
1. Make columns Autofit.
2. Merge cells.
3. Freeze panes.
To this end, I recorded a macro. It looks like this...
Sub Macro1()
Columns("A:BX").Select
Columns("A:BX").EntireColumn.AutoFit
ActiveWindow.ScrollColumn = 1
Range("F5:H5").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Merge
Range("B2").Select
ActiveWindow.FreezePanes = True
End Sub
How do I get from this to the commands I need to use in either
Spreadsheet::WriteExcel, or Win32::OLE?
Thanks.
I want to be able to work out how to do things in excel by myself, but I
don't know how to convert between the macro syntax, and that required in
perl modules.
The 3 things I want to do currently are:
1. Make columns Autofit.
2. Merge cells.
3. Freeze panes.
To this end, I recorded a macro. It looks like this...
Sub Macro1()
Columns("A:BX").Select
Columns("A:BX").EntireColumn.AutoFit
ActiveWindow.ScrollColumn = 1
Range("F5:H5").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Merge
Range("B2").Select
ActiveWindow.FreezePanes = True
End Sub
How do I get from this to the commands I need to use in either
Spreadsheet::WriteExcel, or Win32::OLE?
Thanks.