Another PythonWin Excel question
Marten Bauer
Marten.Bauer at gmx.net
Thu Jan 6 01:48:01 EST 2005
It's me wrote:
> I followed the example in
> http://stompstompstomp.com/weblog/technical/2004-05-20 and learned that to
> add a new worksheet to an Excel workbook, you would use the
> workbook.Worksheets.Add() method. That works. However, the new worksheet
> got added *in front* of the last worksheet I was at. How can I get it to
> add *after*?
>
> Thanks,
>
> --
> Me
>
>
Hello,
I did it yesterday like this way and it works well (part of my code):
wb.Worksheets.Add(Count=nrMonths,After=wb.Worksheets(1))
As I read in MSDN you could not write After="sheet1" instead you must
use the Object of sheet1 like in my example and it works well in my
case. The Count=... statement will create n Sheets after the first worksheet
By
Marten
More information about the Python-list
mailing list