[EMAIL PROTECTED]

| Hello all,
| 
| I'm having some trouble on the find function in Excel. A 
| simple Find statement works fine, but as soon as I want to 
| use an advanced option (xlByColumns) I get an error.
| 

[... snip ...]

| findcell = 
| xlApp.ActiveSheet.UsedRange.Find('FXN3',None,constants.xlValue
| s,constants.xlWhole,constants.xlByColumns,constants.xlNext,Fal
| se,False,None)

| And this is the output:
| C:\temp\python\excel>python findtest.py
| $D$5
| Traceback (most recent call last):
|   File "findtest.py", line 20, in ?
|     findcell = 
| xlApp.ActiveSheet.UsedRange.Find('FXN3',None,constants.xlValues,c
| onstants.xlWhole,constants.xlByColumns,constants.xlNext,False,
| False,None)
|   File "C:\Program 
| Files\python24\lib\site-packages\win32com\gen_py\00020813-000
| 0-0000-C000-000000000046x0x1x4.py", line 21407, in Find
|     , MatchCase, MatchByte, SearchFormat)
| pywintypes.com_error: (-2147352567, 'Exception occurred.', 
| (0, None, None, None,
|  0, -2147352571), 9)

*Very* quick and untested response: try using named
params for the Find method. At the very least, you
can then miss out the default values and it might
narrow the prob. down

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to