Hi Woody
Tis is the macro that I am trying to work
Sub Macro2() ' ' Macro2 Macro ' ' Rows("1:13").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbov +e Columns("C:D").Select Selection.Cut Destination:=Columns("P:Q") Columns("N:O").Select Range("O1").Activate Selection.Delete Shift:=xlToLeft Columns("K:K").Select Selection.Delete Shift:=xlToLeft ActiveWindow.ScrollColumn = 6 ActiveWindow.ScrollColumn = 5 ActiveWindow.ScrollColumn = 4 ActiveWindow.ScrollColumn = 3 ActiveWindow.ScrollColumn = 2 ActiveWindow.ScrollColumn = 1 Columns("C:D").Select Range("D1").Activate Selection.Delete Shift:=xlToLeft Range("A13").Select ActiveCell.FormulaR1C1 = "Patentes" Range("A13").Select ActiveCell.FormulaR1C1 = "Patente" Range("B13").Select ActiveCell.FormulaR1C1 = "Pedimentos" Range("C13").Select ActiveCell.FormulaR1C1 = "Clave Docum" Range("D13").Select ActiveCell.FormulaR1C1 = "Fecha Entrada" Range("E13").Select ActiveCell.FormulaR1C1 = "Fecha Pago" Range("F13").Select ActiveCell.FormulaR1C1 = "RFC Imp. Exp." Range("G13").Select ActiveCell.FormulaR1C1 = "CURP" Range("H13").Select ActiveCell.FormulaR1C1 = "Peso Brutio" Range("H13").Select Selection.ClearContents ActiveCell.FormulaR1C1 = "Peso Bruto" Range("H14:H683").Select ActiveWindow.SmallScroll Down:=-228 ActiveWindow.ScrollRow = 428 ActiveWindow.ScrollRow = 426 ActiveWindow.ScrollRow = 423 ActiveWindow.ScrollRow = 414 ActiveWindow.ScrollRow = 389 ActiveWindow.ScrollRow = 353 ActiveWindow.ScrollRow = 297 ActiveWindow.ScrollRow = 256 ActiveWindow.ScrollRow = 215 ActiveWindow.ScrollRow = 166 ActiveWindow.ScrollRow = 130 ActiveWindow.ScrollRow = 93 ActiveWindow.ScrollRow = 74 ActiveWindow.ScrollRow = 52 ActiveWindow.ScrollRow = 30 ActiveWindow.ScrollRow = 16 ActiveWindow.ScrollRow = 8 ActiveWindow.ScrollRow = 1 Columns("H:H").Select Selection.NumberFormat = "0.000" Columns("I:I").Select Selection.NumberFormat = "$#,##0.00;[Red]$#,##0.00" Range("I13").Select ActiveCell.FormulaR1C1 = "Contribuciones" Range("J13").Select ActiveCell.FormulaR1C1 = "Banco" Range("K13").Select ActiveCell.FormulaR1C1 = "Ped Orig" Range("L13").Select ActiveCell.FormulaR1C1 = "Ped Rectif" Range("F2").Select Cells.Replace What:="\N", Replacement:=" ", LookAt:=xlPart, Search +Order _ :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceForm +at:=False Range("E7").Select ActiveCell.FormulaR1C1 = _ "Relacion de Operaciones Correspondientes a la semana No." Range("E8").Select ActiveCell.FormulaR1C1 = "Comprendida del " Range("C10").Select ActiveCell.FormulaR1C1 = "Patente: " Range("C10").Select Selection.ClearContents Range("B10").Select ActiveCell.FormulaR1C1 = "Patente : " Range("C10").Select ActiveCell.FormulaR1C1 = "=R[4]C[-2]" Columns("A:L").Select Columns("A:L").EntireColumn.AutoFit ActiveWindow.ScrollColumn = 6 ActiveWindow.ScrollColumn = 5 ActiveWindow.ScrollColumn = 4 ActiveWindow.ScrollColumn = 3 ActiveWindow.ScrollColumn = 2 Range("E16").Select Columns("E:E").ColumnWidth = 13.71 Columns("E:E").ColumnWidth = 11.43 Range("B13:L1292").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Range("A13:A1292").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Range("B10:C10").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Range("H10").Select End Sub
How can I convert the macro to perl?

In reply to Re^2: How to run an Excel Macro in Perl? by padawan_linuxero
in thread How to run an Excel Macro in Perl? by ArmandoG

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.