write data in Excel using python
syedmwaliullah at gmail.com
syedmwaliullah at gmail.com
Mon Nov 16 12:14:43 EST 2015
hi,
I am trying to write Excel file suing output from another software where the output comes as myturnlist.Show()
The first part is for the output from the software which is saved in the clipboard.
The big middle part works to open Excel and save the data into excel file called "TurnData.xlsx".
For some reason it doesn't save the file.
Any idea?
Thanks in advance.
import VisumPy.excel
# Write to Excel
myturnlist.Show()
turnData = myturnlist.SaveToClipboard(59,0)
excel = win32com.client.Dispatch("Excel.Application")
wb = excel.Workbooks.Add()
exce.Visible = True
wb.WorkSheets[0].Paste()
excel.activeWorkbook.SaveAs ("c:\TurnData.xlsx")
myturnlist.Close()
More information about the Python-list
mailing list