Hello,
I posted here before asking a question about reading excel. Now that the reading problem is solved i am having trouble on how to write to an excel file.
This was my code to read the excel file:
now i am trying to write arrays of numbers and text into respective excel rows and columns. i am pretty sure the code is similar to the reading code but am not sure how to do it.
also is there a way in python to see what commands can be used with a library. like i know for example in many applications if you type in ? and press enter it prints out all the different commands and what the do. so is there some sort of similar thing in python that prints out all the different commands that can be used with the excel module.
Thanks
I posted here before asking a question about reading excel. Now that the reading problem is solved i am having trouble on how to write to an excel file.
This was my code to read the excel file:
Code:
from win32com.client import Dispatch xlApp = Dispatch ("Excel.Application") xlWb = xlApp.Workbooks.Open ("c:/fahad/new/file.xls") xlSht = xlWb.Worksheets (1) for row in range(200): k=k+1 for col in range(4): if col==1: num1=xlSht.Cells(k,1).Value elif col==2: num2=xlSht.Cells(k,2).Value elif col==3: num3=xlSht.Cells(k,3).Value elif col==4: num4=xlSht.Cells(k,4).Value
also is there a way in python to see what commands can be used with a library. like i know for example in many applications if you type in ? and press enter it prints out all the different commands and what the do. so is there some sort of similar thing in python that prints out all the different commands that can be used with the excel module.
Thanks
Comment