아미(아름다운미소)

python 엑셀(excel) 다루기 본문

랭귀지/python

python 엑셀(excel) 다루기

유키공 2018. 9. 9. 08:00

A1 셀에 값 입력하기

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- coding: utf-8 -*-
'''
Created on 2018. 9. 6.
 
@author: bhm
'''
import win32com.client
 
excel = win32com.client.Dispatch("Excel.Application")
excel.Visible = True
wb = excel.Workbooks.Add()
ws = wb.Worksheets("Sheet1")
ws.Cells(1, 1).Value = "hello python"
wb.SaveAs('C:\\Users\\bhm\\Desktop\\test.xlsx')
excel.Quit()


Comments