win32com and MS Excel
Matthias Huening
mhuening at zedat.fu-berlin.de
Sat Feb 16 13:46:40 EST 2002
Hello,
The following works just fine:
---
from win32com.client import Dispatch
ll = [['aaa', 333, 'ccc']] * 1000
xlApp = Dispatch("Excel.Application")
xlApp.Visible = 1
xlApp.Workbooks.Add()
t = xlApp.Workbooks(1).Sheets(1)
t.Range(t.Cells(1,1), t.Cells(len(ll),3)).Value = ll
---
But when I increase the size of the list (of lists),
my script gets veeerryy slow. With 10000 it is still acceptable,
but with 50000 elements you'll have to wait some minutes for
Excel to show the data. And with 100000, I get a fatal error.
Where is the problem? Is it in win32com or Excel?
And would it be possible to speed things up? How?
(Win98, Excel 2000, ActivePython 2.1)
Thanks, Matthias
More information about the Python-list
mailing list