[python-win32] columnwise writing to excel

Tim Roberts timr at probo.com
Mon Feb 18 18:49:29 CET 2008


Nicholas wrote:
> I am writing to arrays to excel. If I write row-wise everything works well.
> app.Range('d4:f4').Value = [2,3,4]
> However if I try to assign column wise everything goes wrong
> app.Range('d4:d6').Value = [2,3,4]    <gives[2,2,2]>
>
> I know I can rearrage things like [[i] for i in  [2,3,4]] but it does
> not seem terribly efficient. Is there some trick which can allow me to
> write column wise with good performance?
>   

The difference in efficiency is irrelevant.  Have you measured it, or 
are you over-optimizing too early?

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list