Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

worksheet merge¢er cells python

import openpyxl
wb = openpyxl.Workbook()
sheet = wb.active
  
# merge cell from A2 to D4 i.e.
# A2, B2, C2, D2, A3, B3, C3, D3, A4, B4, C4 and D4 .
# A2:D4' merges 12 cells into a single cell. 
sheet.merge_cells('A2:D4')
  
sheet.cell(row = 2, column = 1).value = 'Twelve cells join together.'
  
# merge cell C6 and D6
sheet.merge_cells('C6:D6')
  
sheet.cell(row = 6, column = 6).value = 'Two merge cells.'
  
wb.save('merge.xlsx')
Comment

PREVIOUS NEXT
Code Example
Python :: add colour to text in python 
Python :: subplot adjust python 
Python :: python how to code discord bot kick members 
Python :: is prime python 
Python :: how to set a timer in while loop python 
Python :: python check if number is complex 
Python :: python loop through files in directory 
Python :: Python Time object to represent time 
Python :: multiline input in python 
Python :: python sympy solve equation equal to 0 
Python :: multiple loss pytorch 
Python :: ignore module import log in python 
Python :: fourreau de maroquin 
Python :: extract images from bag file python 
Python :: minimum from list of tuples 
Python :: pandast change datetime to date 
Python :: python nested tqdm 
Python :: rename file python 
Python :: python get average list in 2d array 
Python :: pros and cons of python flush print function 
Python :: selenium upload file python 
Python :: python record screen 
Python :: matplotlib draw a line between two points 
Python :: python pickle save and load multiple variables 
Python :: edit line if str end with pandas 
Python :: python sort list of lists by second element 
Python :: how to strip a list in python 
Python :: python zip lists into dictionary 
Python :: element not found selenium stackoverflow 
Python :: how to show multiple image in plt.imshow 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =