Solomon:<br>In what way did <b>int(worksheet.Cells(row, col).Value </b>not work? It seems that it should have. (You should not do a &quot;cast&quot;, you want a conversion). To find out what&#39;s going on, try something like:<br>
<br>alpha = worksheet.Cells(row,col).Value<br>print &#39;Value was=&#39;, repr(alpha)<br><br><div class="gmail_quote">Perhaps there is something about the received string that will not convert. For example, an empty string will give you a ValueError. You may have to use something like:<br>
try:<br>&nbsp;&nbsp;&nbsp; val = int(alpha)<br>except ValueError:<br>&nbsp;&nbsp; val = 0&nbsp; # or do you want val = None ?<br>--<br>Vernon Cole<br><br>On Wed, Nov 19, 2008 at 1:55 AM,  <span dir="ltr">&lt;<a href="mailto:Solomon.Zewdie.Altek@zf.com">Solomon.Zewdie.Altek@zf.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
the statement: &nbsp;worksheet.Cells(row, col).Value returns a Value of type of Strings,<br>
Can anyone tell me how I can get an Integer value?<br>
Casting (int(worksheet.Cells(row, col).Value ) didn&#39;t work.<br>
<br>
Many Tnx!<br>
<br>
solomon<br>
_______________________________________________<br>
python-win32 mailing list<br>
<a href="mailto:python-win32@python.org">python-win32@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-win32" target="_blank">http://mail.python.org/mailman/listinfo/python-win32</a><br>
</blockquote></div><br>