Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import win32com.client
- xl = win32com.client.Dispatch("Excel.Application")
- xl.Visible = True
- wb = xl.Workbooks.Add()
- ws = wb.Worksheets.Add()
- cell = ws.Cells(1)
- cell.Value = 'text'
- wb.Close(True, r'c:AcousticAutomationTestFolderTestDatatest.xls')
- os.rename('c:..file path...test.txt', 'c:..file path..test.csv')
- import win32com.client
- xl = win32com.client.Dispatch("Excel.Application")
- xl.Visible = True
- wb = xl.WorkBooks.open(r'c:..test file path..test.xls’)
- xl.Run(‘DeleteTopRows')
Add Comment
Please, Sign In to add comment