Open
Description
Let's say I have a .ods file with merged cells like this:
+----------------------+------------+----------+----------+
| Header row, column 1 | Header 2 | Header 3 | Header 4 |
+======================+============+==========+==========+
| body row 1, column 1 | column 2 | column 3 | column 4 |
+----------------------+------------+----------+----------+
| body row 2 | Cells may span columns. |
+----------------------+----------------------------------+
| body row 3 | Cells may | - Table cells |
+----------------------+ span rows. | - contain |
| body row 4 | | - body elements. |
+----------------------+------------+---------------------+
Then if I do:
import pyexcel_ods
data = pyexcel_ods.get_data('example.ods')
pyexcel_ods.save_data('example.ods', data)
The resulting table loses it's merged cells and looks like this:
+----------------------+-------------------------+------------------+----------+
| Header row, column 1 | Header 2 | Header 3 | Header 4 |
+======================+=========================+==================+==========+
| body row 1, column 1 | column 2 | column 3 | column 4 |
+----------------------+-------------------------+------------------+----------+
| body row 2 | Cells may span columns. | | |
+----------------------+-------------------------+------------------+----------+
| body row 3 | Cells may | - Table cells | |
| | span rows. | - contain | |
| | | - body elements. | |
+----------------------+-------------------------+------------------+----------+
| body row 4 | | | |
+----------------------+-------------------------+------------------+----------+
Is there any way to maintain merged cells? Thanks.
Metadata
Metadata
Assignees
Labels
No labels