We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Merging to cells that are merged together + wrap text not working in


I’ve attached a zip file with two identical web projects. The only difference between them is that one has Cells and the other has Cells

The problem I have is that the output from is different than it is for with regard to cells that have been merged together and have wrap text enabled.

From version, the (desired) output looks like this:

From version, the output looks like this:

Could you please take a look at this? I’m eager to upgrade from to 4.8.2.x to take advantage of some other updates!


Hi Mike,

Well, the behavior is the same as MS Excel, if there are some merged cells in the worksheet with wrapping text on, you cannot auto-fit the row operation on those cells. You can check this behavior in MS Excel manually doing the steps. Aspose.Cells for .NET follows MS Excel standards.

I think for your requirement, you should unmerge the marker cells (but you need to have wrapping text on, you can also extend the column widths of the marker cells i.e…,
B4 and J4 too.) and then apply your code to auto-fit the row(s), it will work fine.

Thank you.

Hi Amjad,

Unfortunately your suggestion to unmerge the marker cells isn’t feasible in this case because the “real” Excel template is much more complicated than the simple example I provided. (In the “real” template, there are many columns of markers, finely aligned above and below the merged cell. So the placement and appearance of the merged cell is firmly established.)

Back in August of 2008, you were very kind to create the functionality so I could place markers in a merged cell:

Then later, in October of 2008, you were again so considerate to add in the functionality for me so that auto-fit rows would work with merged cells:

I do hope you’re not telling me that the feature added in 4.5.1 hasn’t disappeared. My users and I would basically be “stranded” on


OK, after looking into your issue, we have decided to add an option for
your need if you do not want to fit the merged cells as MS Excel.

We have logged your request into our issue tracking system with an id: 15547. We will provide the supported version soon.

Thank you.

That’s great news, Amjad.

Maybe a variation on the AutoFitRows( ) method to accept a parameter to enable the expansion of merged cells?

Thank you!


Please try the attached version. We now support the auto-fit options. Please change your code as the following:

WorkbookDesigner designer = new WorkbookDesigner();

AutoFitterOptions options = new AutoFitterOptions();

options.AutoFitMergedCells = true;

for (int i = 0; i < designer.Workbook.Worksheets.Count; i++)






catch { }

<span style=“font-family: “Calibri”,“sans-serif”;”>

Thank you.

This is great news. Many thanks, Amjad.

– Mike

The issues you have found earlier (filed as 15547) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.