excel application

luca72 lucaberto at libero.it
Wed Mar 29 17:04:27 CEST 2006


Hello here is the code:

        from win32com.client import Dispatch
        packing = Dispatch("Excel.Application")
        packing.Visible = 1
        packing.Workbooks.Add()
        #packing.Worksheets.Add()
        packing.ActiveSheet.Range("A1").ColumnWidth = 8
        packing.ActiveSheet.Range("B1").ColumnWidth = 12
        packing.ActiveSheet.Range("C1").ColumnWidth = 6
        packing.ActiveSheet.Range("D1").ColumnWidth = 6
        packing.ActiveSheet.Range("E1").ColumnWidth = 6
        packing.ActiveSheet.Range("F1").ColumnWidth = 60
        packing.ActiveSheet.Range("G1").ColumnWidth = 13
        packing.ActiveSheet.Range("H1").ColumnWidth = 10
        packing.ActiveSheet.Range("A8:H9").Select()
        packing.ActiveSheet.Selection.Borders(xlDiagonalDown).LineStyle
= xlNone

The error messege is

global name xlNone is not definied

what I have mistaken?

Regards 

Luca




More information about the Python-list mailing list