Download for testing

Am testing the following code after I downloaded evaluation and do not uderstand why cells are not formatting with the following code:

excel.Worksheets(0).Cells(“A3”).Style.Borders.DiagnolStyle = CellBorderType.MediumDashDot

excel.Worksheets(0).Cells(“A3”).Style.Borders.DiagnolColor = Color.Aqua
excel.Worksheets(0).Cells(“A3”).Style.BackgroundColor = Color.Red

please advise.

Hi, thanks for your consideration.

When the cell’s fill pattern is not set or set to Solid, the background color will not take effect. Please set the foreground color to meet your need.

excel.Worksheets(0).Cells(“A3”).Style.ForegroundColor = Color.Red

About the diagonal settings, it’s a careless omission. I am sorry for this bug. Now you can use the following code to set it.

excel.Worksheets(0).Cells(“A3”).Style.Borders(BorderType.DiagnolDown).LineStyle = CellBorderType.MediumDashDot

excel.Worksheets(0).Cells(“A3”).Style.Borders(BorderType.DiagnolDown).Color = Color.Aqua

excel.Worksheets(0).Cells(“A3”).Style.Borders(BorderType.DiagnolUp).LineStyle = CellBorderType.MediumDashDot

excel.Worksheets(0).Cells(“A3”).Style.Borders(BorderType.DiagnolUp).Color = Color.Aqua

In next hotfix, I will fix your mentioned problem.

Thanks again for your feedback.