파이썬으로 EXCEL 파일 열고 쓰기

=======================================

import win32com.client
xl = win32com.client.dynamic.Dispatch("Excel.Application")
wb = xl.Workbooks.Open("c:\\temp.xls")
sh = wb.Sheets[0]
sh.Cells(1,1).Value = "test"
wb.Save()
xl.Quit()

=======================================

import win32com.client
xl = win32com.client.dynamic.Dispatch("Excel.Application")
wb = xl.Workbooks.Open("c:\\temp.xls")
sh = wb.Sheets[0]
sh.Cells(1,1).Value = "test"
wb.Save()
xl.Quit()

=======================================

+ Recent posts