Re: Another PythonWin Excel question

2005-01-06 Thread It's me
Okay, thanks. That helps a lot. "Mike Thompson" wrote in message news:[EMAIL PROTECTED] > It's me wrote: > > Yes, Mike, > > > > Others pointed that out as well. > > For good reason. > > > > > The difficulty is that they are all in VBAs. Most of them can be > > translated to Python fairly easil

Re: Another PythonWin Excel question

2005-01-06 Thread Mike Thompson
It's me wrote: Yes, Mike, Others pointed that out as well. For good reason. The difficulty is that they are all in VBAs. Most of them can be translated to Python fairly easily, and some I can get from looking at the recorded macro - but some requires quite a bit of head scratching. For instance,

Re: Another PythonWin Excel question

2005-01-06 Thread It's me
Yes, Mike, Others pointed that out as well. The difficulty is that they are all in VBAs. Most of them can be translated to Python fairly easily, and some I can get from looking at the recorded macro - but some requires quite a bit of head scratching. For instance, I wanted to figure out how cr

Re: Another PythonWin Excel question

2005-01-06 Thread Mike Thompson
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 w

Re: Another PythonWin Excel question

2005-01-06 Thread It's me
Thanks, "David Bolen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "It's me" <[EMAIL PROTECTED]> writes: > > > Yes, I read about that but unfortunately I have no experience with VBA *at > > all*. :=( > > You don't really have to know VBA, but if you're going to try to > interact

Re: Another PythonWin Excel question

2005-01-06 Thread David Bolen
"It's me" <[EMAIL PROTECTED]> writes: > Yes, I read about that but unfortunately I have no experience with VBA *at > all*. :=( You don't really have to know VBA, but if you're going to try to interact with COM objects from Python, you'll find it much smoother if you at least use any available re

Re: Another PythonWin Excel question

2005-01-06 Thread It's me
"Marten Bauer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > 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 th

Re: Another PythonWin Excel question

2005-01-05 Thread Marten Bauer
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 w

Re: Another PythonWin Excel question

2005-01-05 Thread It's me
Ah, this work: self.xlbook.Worksheets.Add(None,sht) got it from: http://mail.python.org/pipermail/python-list/2003-September/183367.html Thanks again. -- Me "It's me" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Kartic" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL P

Re: Another PythonWin Excel question

2005-01-05 Thread Kartic
Sorry, I was thinking of the move() method. Move() takes the after= argument. See this link for usage. (The left nav bar has all other method of the worksheets collection, so bookmark this page :-) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrtskhowtoaddnewwor

Re: Another PythonWin Excel question

2005-01-05 Thread It's me
"Kartic" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am not sure about this but I believe you can give a parameter > after="sheet1". to Add(), like so, Add(after="sheet1"). > I get a "got an expected keyword argument 'after'" from Add(). > Unfortunately I do not have Excel in

Re: Another PythonWin Excel question

2005-01-05 Thread Kartic
I am not sure about this but I believe you can give a parameter after="sheet1". to Add(), like so, Add(after="sheet1"). Unfortunately I do not have Excel installed on this machine to confirm this. A tip: if you have VBA (which you should if you have Excel) installed, lookup the Add method for the

Another PythonWin Excel question

2005-01-05 Thread It's me
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 ca