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;

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.


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;
book.Save(dir + “output.xlsx”);