EvotecIT / OfficeIMO

Fast and easy to use cross-platform .NET library that creates or modifies Microsoft Word (DocX) and later also Excel (XLSX) files without installing any software. Library is based on Open XML SDK
MIT License
289 stars 50 forks source link

how can I add a table with two rows and each row had diff columns and width? #222

Closed coader closed 6 months ago

coader commented 7 months ago

In office, I can merge cells and then split to new columns, then resize the column width of current row. and how can I do this in OfficeIMO?

PrzemyslawKlys commented 7 months ago

You can try to split and/merge Cells:

wordTable.Rows[0].Cells[1].SplitHorizontally(2);
wordTable.Rows[0].Cells[1].MergeHorizontally(2, true);

I am not sure if that will help you with what you're trying to do. Maybe we need to add something that makes this possible.