[python-win32] Pywin32-Excel Range/Cells problems
Tim Roberts
timr at probo.com
Mon Mar 15 18:03:31 CET 2010
Sylvain Fauveau (apli-agipa) wrote:
> Hello everybody.
>
> I have detected a problem with a cell with loooong text in it but I'm
> not sure of his source.
>
> To reproduce it :
> from win32com.client import Dispatch
> excel = Dispatch('Excel.Application')
> sheet = excel.ActiveSheet
>
> sheet.Range('A1:C1').Value = ['test','test'*400,'test']
> doesn't work :
> pywintypes.com_error(-2147352567,"Une exception s'est produite.", (0,
> None, None, None, 0, -2416827284), None)
It's always dangerous to retype lines like these instead of cutting and
pasting, because it's so easy to mistype the error number. In this
case, the error is actually -2146827284, which would be 800A03EC
(ERROR_INVALID_FLAGS), but that isn't a typical Excel error code.
For what it's worth, it works up through 911 characters and fails on
912. That's odd. I wonder if this is a request-length restriction in
the marshalling code.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list