Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read merged cell with xlrd in python?

I'm trying to read merged cells from sheet and unfortunately nothing is working for me. I'm in a situation where i want to read Row merges, column merges or may be combination of both. Any help will be appreciated. PS. I already tried sheets.merged_cells which returns blank array.

Thank you.

like image 914
Akshay Kolte Avatar asked Sep 02 '25 15:09

Akshay Kolte


1 Answers

Docs: http://xlrd.readthedocs.io/en/latest/api.html#xlrd.sheet.Sheet.merged_cells

Please ensure that you have read the second "Note" -- if you don't specify formatting_info=True in xlrd.open_workbook(), you will get an empty list (what you call a "blank array").

like image 101
John Machin Avatar answered Sep 05 '25 13:09

John Machin