<div>from win32com.client import Dispatch</div>
<div>soo... that would be com.. sorry about that.. </div>
<div>xlSht is the worksheet I'm currently reading from. </div>
<div><br> </div>
<div><span class="gmail_quote">On 9/11/06, <b class="gmail_sendername">Kent Johnson</b> <<a href="mailto:kent37@tds.net">kent37@tds.net</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Chris Hengge wrote:<br>> This is what I have, but it requires me to know the end of the column<br>> I'm working with, which changes.
<br>><br>> try:#Loop through the rows from 6 -> 25<br>> for row in range(6, 25):<br>> #Write each row, increment 1+row in column 5<br>> print >> file, "(%d) => %s" % (row,
xlSht.Cells (1+row, 5).Value)<br>><br>> I'm looking for something more like<br>> try:#Loop until rows are null<br>> while row in xlwksht != null<br>> #Write each row, incriment 1+row in column 5
<br>> print >> file, "'" + %s + "',", % (xlSht.Cells(1+row,5).Value)<br><br>What is xlSht? Are you using COM, or xlrd, or pycelerator, or?? to read<br>the spreadsheet? It probably has a way to find out the last row, or if
<br>the cell has data...<br><br>Kent<br><br>_______________________________________________<br>Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/tutor">
http://mail.python.org/mailman/listinfo/tutor</a><br></blockquote></div><br>