in reply to which module to use?

I use Win32::OLE for that (and the Excel Macro Recorder, to find out the functions to call in the API)

Replies are listed 'Best First'.
Re^2: which module to use?
by ArmandoG (Sexton) on Jan 11, 2008 at 19:34 UTC
    I am afraid I did not understand, Excel Macro Recorder? are not all the functions that i need in one module?
    Thanks
        I have here a copy of the macro to leave my excel file like I wanted can you help me understand which modules I need to use?
        These is the macro
        Sub test12() ' ' test12 Macro ' ' Workbooks.Open Filename:="C:\Proyecto\csv\T3683.csv.xls" Range("A1:M1196").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 Columns("B:B").EntireColumn.AutoFit Columns("E:E").EntireColumn.AutoFit Columns("H:H").EntireColumn.AutoFit Columns("I:I").EntireColumn.AutoFit ActiveWindow.SmallScroll Down:=-24 Rows("1:10").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbov +e Rows("9:12").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbov +e Range("A14").Select ActiveCell.FormulaR1C1 = "PATENTE" Range("B14").Select ActiveCell.FormulaR1C1 = "pedimento" Columns("C:D").Select Selection.Cut Destination:=Columns("N:O") Columns("C:D").Select Range("D1").Activate Selection.Delete Shift:=xlToLeft Range("D14").Select Columns("C:C").ColumnWidth = 6.71 Range("C14").Select ActiveCell.FormulaR1C1 = "documento" Range("D14").Select ActiveCell.FormulaR1C1 = "fec entra" Range("E14").Select ActiveCell.FormulaR1C1 = "fec salida" Range("F14").Select ActiveCell.FormulaR1C1 = "RFC imp/exp" Range("G14").Select ActiveCell.FormulaR1C1 = "CURP" Range("H14").Select ActiveCell.FormulaR1C1 = "peso bruto" Range("J14").Select ActiveCell.FormulaR1C1 = "contribuciones" Range("K14").Select ActiveCell.FormulaR1C1 = "banco" Range("L14").Select ActiveCell.FormulaR1C1 = "ped orig" Range("M14").Select ActiveCell.FormulaR1C1 = "ped recfif" Columns("I:I").Select Selection.Delete Shift:=xlToLeft Range("A14:L14").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 Selection.Font.Bold = True With Selection.Font .ThemeColor = xlThemeColorLight2 .TintAndShade = 0.399975585192419 End With Range("E8").Select ActiveCell.FormulaR1C1 = _ "RELACION DE OPERACIONES CORRESPONDIENTES A LA SEMANA " With ActiveCell.Characters(Start:=1, Length:=53).Font .Name = "Arial" .FontStyle = "Normal" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic .TintAndShade = 0 .ThemeFont = xlThemeFontNone End With Range("E8").Select End Sub
        I really apreciate your help
        Thanks