본문 바로가기

Python_Intermediate/Openpyxl

Python Openpyxl - Merged

'''
셀 합치기
'''
import openpyxl

wb = openpyxl.Workbook()

sheet = wb.active

sheet.merge_cells('A1:D3')
sheet['A1'] = 'Twelve cells merged together.'

sheet.merge_cells('C5:D5')
sheet['C5'] = 'Two merged cells.'

wb.save('merged.xlsx')

merged.xlsx
0.00MB

'Python_Intermediate > Openpyxl' 카테고리의 다른 글

Python Openpyxl - Excel to TXT  (0) 2019.08.09
Python Openpyxl - Merged  (0) 2019.08.09
Python Openpyxl - SumFormulas  (0) 2019.08.09
Python Openpyxl - WriteFormula  (0) 2019.08.09
Python Openpyxl - New File SAVE  (0) 2019.08.09
Python Openpyxl - Basic  (0) 2019.08.09