MoonNote

반응형
     

 

 

 

OPENPYXL

◾ Python으로 엑셀을 다루기 위한 라이브러리

◾ 대표적인 Excel(*.xlsx 파일) 관련 모듈로 읽기/쓰기 모두 가능

◾ 공식문서 페이지 :

     OPENPYXL(https://openpyxl.readthedocs.io/en/stable/index.html)

 

XLRD/XLWT (MS 구버전용)

◾ Python으로 엑셀을 다루기 위한 라이브러리

◾ Excel 97-2003(*.xls 파일)을 다룰 때 사용

Excel Read/Write로 XLRD는 'Excel Read', XLWT는 'Excel Write'라는 의미

◾ 공식문서 페이지 :
     XLRD(https://xlrd.readthedocs.io/en/latest/api.html)
     XLWT(https://xlwt.readthedocs.io/en/latest/api.html)

 

 

 

설치(Installation)

pip 이용시,

pip install openpyxl
pip install xlrd
pip install xlwt

 

conda를 사용한다면,

conda install -c anaconda openpyxl
conda install -c anaconda xlrd
conda install -c anaconda xlwt

 

* Image 파일(jpeg, png, bmp,…)을 다루려면 "pillow" 라이브러리 필요(pillow 설치 명령어)

pip install pillow

 

 

엑셀 함수 관련(OPENPYXL만 다룸)

Sheet 다루기

Sheet 이름 및 개수 확인

Sheet 추가, 삭제

Sheet 복사, 이름 변경

Sheet 색상 적용하기

 

Cell 다루기

Cell 값 읽기

Cell 데이터 사이즈 확인하기

Cell 값 쓰기

Cell 중복된 데이터 다루기

Cell 검색 및 대체

 

 

 

 

 

 

 

 

 

※ 이 글이 도움이 되었다면 "👆🏻구독"과 "🤍공감" 버튼을 클릭해주세요. 클릭 한번이 글 쓰는데 큰 힘이 됩니다.

공유하기

facebook twitter kakaoTalk kakaostory naver band