Free Support Forum - aspose.com

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

Hello,

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

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

From version 4.8.1.3, the (desired) output looks like this:
http://screencast.com/t/OWE4YmJmYWU

From version 4.8.2.8, the output looks like this:
http://screencast.com/t/NmQ4MzNiN

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

Thanks,
Mike

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:
http://www.aspose.com/community/forums/156595/using-smartmarkers-in-merged-cells/showthread.aspx#156595

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:
http://www.aspose.com/community/forums/146773/auto-fit-rows/showthread.aspx#146773

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 4.8.1.3.

Hi,



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!

Hi,

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++)

{

try

{

designer.Workbook.Worksheets[i].AutoFitRows(options);

}

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.