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

Free Support Forum - aspose.com

Excel/Aspose inconsistency in cell format

Dear Appose team,

There is a little inconsistency between Aspose and Excel on formatting cells with thick borders.
E.g. If you add a thick/double bottom border to Excel cell, Excel slightly increases the corresponding row height. Aspose doesn’t do that neither on setting border formatting or on applying row auto fit property.
Please, investigate if it can be fixed?

Example:
int row = 9;
int col = 2;
Aspose.Cells.Cell testCell = wsh.Cells[row, col];
testCell.Value = “text”;

Aspose.Cells.Style cellStyle = testCell.GetStyle();
cellStyle.SetBorder(BorderType.BottomBorder, CellBorderType.Double, System.Drawing.Color.Black);
testCell.SetStyle(cellStyle);
wsh.AutoFitRow(row);


cheers,
Alex

Hi Alex,


Thanks for providing us some details sand sample code.

After an initial test, I observed this minor difference as you mentioned. Aspose.Cells does not increase the corresponding row height a bit by adding a thick/double bottom border to a cell where as MS Excel does. Using the following sample code, Aspose.Cells gives 17 pixels for the row height value where as doing the similar steps in MS Excel manually, we have 18 pixels.
e.g
Sample code:

Workbook workbook = new Workbook();
Worksheet wsh = workbook.Worksheets[0];
int row = 9;
int col = 2;
Aspose.Cells.Cell testCell = wsh.Cells[row, col];
testCell.Value = “text”;

Aspose.Cells.Style cellStyle = testCell.GetStyle();
cellStyle.SetBorder(BorderType.BottomBorder, CellBorderType.Double, System.Drawing.Color.Black);
testCell.SetStyle(cellStyle);
wsh.AutoFitRow(row);

workbook.Save(“e:\test2\outexcelincons1.xlsx”);

I have logged a ticket with an id “CELLSNET-43251” for your issue. Although it is just a minor difference, but we will check if we could mimic Ms Excel for the functionality.

Once we have any update on it, we will let you know here.

Thank you.


Hi,


Please try our latest version/fix: Aspose.Cells for .NET v8.3.1.6

We have fixed your issue now.

Let us know your feedback.

Thank you.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.