How remove excell cells border color?

I want remove excell cells border. By default it have thick border. I try this code but its not remove it.

Style style = cell.GetStyle();
style.Borders[BorderType.Vertical].LineStyle = CellBorderType.None;
style.Borders.SetColor(Color.White);
cell.SetStyle(style);

Hi Mesteruh,


Thank you for contacting Aspose support.

I have evaluated the presented scenario while using the latest version of Aspose.Cells for .NET 8.9.1 and the following piece of code against a sample of my own. I am afraid, I am not able to observe any problem. Please give a try to the latest version on your side as well. In case the problem persists, please share your sample for further investigation.

C#

using (Workbook book = new Workbook(dir + “border.xlsx”))
{
Cell cell = book.Worksheets[0].Cells[“B2”];
Style style = cell.GetStyle();
style.Borders[BorderType.TopBorder].LineStyle = CellBorderType.None;
style.Borders[BorderType.BottomBorder].LineStyle = CellBorderType.None;
style.Borders[BorderType.LeftBorder].LineStyle = CellBorderType.None;
style.Borders[BorderType.RightBorder].LineStyle = CellBorderType.None;
cell.SetStyle(style);
book.Save(dir + “output.xlsx”);
}