Eshant
Eshant

Reputation: 75

Merging more than two cells using xlwt python

I am trying to merge 4 columns in a row of an excel file. This link has some suggestions on how to do it for two rows: How to write a cell with multiple columns in xlwt? The line it uses to merge two columns and two rows:

sheet.write_merge(0, 0, 0, 1, 'Long Cell')

However, the same code syntax does not work when i try to merge 4 rows only. My code:

sh.write_merge(0,4,0,5,0,6,0,7,'Start point\nCo-ordinates')

I basically need something like this.

Upvotes: 2

Views: 2534

Answers (1)

buran
buran

Reputation: 14233

maybe this?

sh.write_merge(0, 0, 4, 7, 'Start point\nCo-ordinates')

Upvotes: 3

Related Questions