I want to disable GridLines in excel and put custom borders to excel cells using open xml in C#
I have tried with below code but is throwing exception when i open th
The WorkbookViewId property of the SheetView class is a required attribute/property. Try this:
SheetView sheetView = new SheetView();
sheetView.ShowGridLines = new BooleanValue(false);
sheetView.WorkbookViewId = 0;
sheetViews.Append(sheetView);
ws.Append(sheetViews);
That uses the 1st (default) workbook view. Don't worry, you don't have to explicitly create a WorkbookView child of the BookViews class, which is a child of Workbook. Unless you want to, of course. :)