This is what I have, but it requires me to know the end of the column I'm working with, which changes.
 
try:#Loop through the rows from 6 -> 25
    for row in range(6, 25):
        #Write each row, increment 1+row in column 5
        print >> file, "(%d) => %s" % (row, xlSht.Cells (1+row, 5).Value)
 
I'm looking for something more like
try:#Loop until rows are null
    while row in xlwksht != null
         #Write each row, incriment 1+row in column 5
         print >> file, "'" + %s + "',", % (xlSht.Cells(1+row,5).Value)
 
Maybe someone already tackled this? Or am I over thinking this problem?
 
Thanks.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to