Solomon:
In what way did *int(worksheet.Cells(row, col).Value *not work? It seems
that it should have. (You should not do a "cast", you want a conversion). To
find out what's going on, try something like:

alpha = worksheet.Cells(row,col).Value
print 'Value was=', repr(alpha)

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:
try:
    val = int(alpha)
except ValueError:
   val = 0  # or do you want val = None ?
--
Vernon Cole

On Wed, Nov 19, 2008 at 1:55 AM, <[EMAIL PROTECTED]> wrote:

> Hi,
> the statement:  worksheet.Cells(row, col).Value returns a Value of type of
> Strings,
> Can anyone tell me how I can get an Integer value?
> Casting (int(worksheet.Cells(row, col).Value ) didn't work.
>
> Many Tnx!
>
> solomon
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to