[python-win32] [Fwd: Re: Excel advanced find]

p.asselman at chello.nl p.asselman at chello.nl
Thu Feb 16 13:23:27 CET 2006


> 
> van: "Mark Hammond" <mhammond at skippinet.com.au>
> datum: 2006/02/16 do AM 03:10:28 CET
> aan: "Dan Glassman" <dan.glassman at charter.net>,  <python-win32 at python.org>
> onderwerp: Re: [python-win32] [Fwd: Re:  Excel advanced find]
> 
> > > [code]
> > > from pythoncom import Missing
> > > usedRange = xlApp.ActiveSheet.UsedRange
> > > usedRange.Find('FXN3', Missing, constants.xlValues,
> > >                 constants.xlWhole, constants,xlByColumns,
> > >                 constants.xlNext, False, False, Missing)
> > > [/code]
> >
> > Whoa -- disregard that suggestion; that was really bad idea on my
> > part.  All the arguments after the first Missing get ignored if
> > you do that.
> 
> pythoncom.Empty will behave as you desire - it will present an "empty"
> variant (VT_EMPTY).  There is no way to truly provide NULL for an individual
> item as they are passed as an array (and pythoncom.Missing is where this
> array gets terminated)

Thanks, that is exactly what I was looking for.  It works like a charm!
This should really be added to some readme or documentation file, or some of the example demos. 

The syntax of most commands can be figured out pretty easily through the msdn website or vBasic examples (which often leave out some command arguments), but this is something really Python-Win32-specific and I haven't read about it anywhere...

Thanks again,

Patrick Asselman



More information about the Python-win32 mailing list