Problem with borders styles and colors

I guess there is a problem with borders and styles/color (the problem already occured before v3.0.6). In the following example, the Cells (1,1) and (2,1) will have the SAME border color altough one should Red and the other should be blue. Could you fix this problem ?

wsh.Cells(1, 1).Style.Borders(BorderType.TopBorder).LineStyle = CellBorderType.Medium

wsh.Cells(1, 1).Style.Borders(BorderType.TopBorder).Color=Drawing.Color.Red

wsh.Cells(2, 1).Style.Borders(BorderType.TopBorder).LineStyle = CellBorderType.Medium

wsh.Cells(2, 1).Style.Borders(BorderType.TopBorder).Color=Drawing.Color.Blue

Try this attached fix please.

Thanks a lot.
It works fine.

We are very impressed by the performance of XL worksheet creation (data and styles), and we will probably definitively choose Aspose.Excel as our “Excel feeding” component.

Regards

S. Vallenet

@vallenet,
Aspose.Cells has replaced Aspose.Excel that is no more available now. You can set border style using Aspose.Cells as well by setting the border edge, border type and border color as ddemonstrated in the following sample code:

Workbook workbook = new Workbook(); // Creating a Workbook object

workbook.Worksheets.Add();

Worksheet worksheet = workbook.Worksheets[0];

// Style the cell with borders all around.

Style style = workbook.CreateStyle();

style.SetBorder(BorderType.BottomBorder, CellBorderType.Thick, Color.Red);

style.SetBorder(BorderType.LeftBorder, CellBorderType.Thick, Color.Green);

style.SetBorder(BorderType.RightBorder, CellBorderType.Thin, Color.Blue);

style.SetBorder(BorderType.TopBorder, CellBorderType.MediumDashed, Color.Yellow);

Cell cell = worksheet.Cells["B2"];

cell.SetStyle(style);

workbook.Save("test.xlsx", SaveFormat.Xlsx); //Workbooks can be saved in many formats

Refer to the following article for more information about working with border style:
Working With Borders

Here you will find the latest version of this new product which can be freely downloaded for trials:
Aspose.Cells for .NET (Latest Version)

A detailed runnable solution is prepared which can be used to test the product features without writing any code. It can be downloaded here.