-
xlwings 라이브러리에서 좌표로 내용 입력하는 함수Python/tip of python 2020. 8. 19. 08:59
xlwings에서 내용입력 시 좌표가 아닌 A3, V2 같은형태로 위치를 지정한다.
좌표(row, column)와 내용과 시트명을 쓰면 내용 입력하는 형태의 함수.
Z 뒤까지 쓰려면, alph에 Z 뒤로 계속 연결해서 더 입력하면 된다.
def cell_w(x,y,cont,sheet):
alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
w_lo = alph[y-1] + str(x)
sheet.range(w_lo).value = cont
return'Python > tip of python' 카테고리의 다른 글
python - 빠진 자리 data (missingno) (0) 2020.07.20 installing libraries on conda (0) 2020.07.20 data frame 문자열 다루기 (0) 2020.07.16 python - tip : 원하는 조건의 값을 받아내기 전까지 반복 (0) 2020.07.13 a, b값 바꿔치기(상호 교환) (0) 2020.07.13