Re: [Tutor] Looping, and Win32com.client

2008-12-19 Thread Andreas Kostyrka
Am Fri, 19 Dec 2008 15:57:49 + schrieb Tim Golden : > Eduardo Vieira wrote: > > Hello, this is my first post in this list and I'm not a programmer, > > but am enjoying learning python. > > I'm trying to make a script to add worksheets to excel files: > > I managed to implement this code: > >

Re: [Tutor] Looping, and Win32com.client

2008-12-19 Thread Tim Golden
Tim Golden wrote: Eduardo Vieira wrote: Hello, this is my first post in this list and I'm not a programmer, but am enjoying learning python. I'm trying to make a script to add worksheets to excel files: I managed to implement this code: import os folder = 'C:\\Personal\\oldxlsformat\\' from win

Re: [Tutor] Looping, and Win32com.client

2008-12-19 Thread Eduardo Vieira
Thank you, now it worked! I made these changes to my code: for ficheiro in os.listdir(folder): file = os.path.join(folder, ficheiro) #added this if ficheiro.endswith('.xls'): wb = xl.Workbooks.Open(file, 2) # changed this On Fri, Dec 19, 2008 at 8:57 AM, Tim Golden wrote: > Eduard

Re: [Tutor] Looping, and Win32com.client

2008-12-19 Thread Tim Golden
Eduardo Vieira wrote: Hello, this is my first post in this list and I'm not a programmer, but am enjoying learning python. I'm trying to make a script to add worksheets to excel files: I managed to implement this code: import os folder = 'C:\\Personal\\oldxlsformat\\' from win32com.client import

[Tutor] Looping, and Win32com.client

2008-12-19 Thread Eduardo Vieira
Hello, this is my first post in this list and I'm not a programmer, but am enjoying learning python. I'm trying to make a script to add worksheets to excel files: I managed to implement this code: import os folder = 'C:\\Personal\\oldxlsformat\\' from win32com.client import Dispatch xl = Dispatch(