Win32 and Excel ranges
fabien.todescato at acm.org
Sun Oct 13 21:51:09 CEST 2002
"L Whitley" <ldwhitley at RemoveMe.charter.net> wrote in message news:<uqelcb717e2h21 at corp.supernews.com>...
> I've been going through Mark Hammond's book doing his Python/Excel examples.
> It's working nicely but I'm dissapointed with the performance of storing a
> lot of data in the spread sheet cell by cell. My data is in lists and I
You may want to transfer your data using 'matrix' assignments, as the
following code snippet illustrates :
from win32com.client import Dispatch,constants
e = Dispatch('excel.application')
e.Visible = 1
s = e.Workbooks.Add().Worksheets(1)
s.Range('A1:B2').Value = [ [ 1 , 2 ] , [ 3 , 4 ] ]
More information about the Python-list