//************Sheet Protection****************** Protection objProtection = new Protection(); objProtection.Locked = true; cellFormat.ApplyProtection = true; cellFormat.Append(objProtection); SheetProtection objStyleSheetP = new SheetProtection(); objStyleSheetP.Password = "123"; objStyleSheetP.Sheet = true; objStyleSheetP.Objects = true; objStyleSheetP.Scenarios = true; styleSheet.CellFormats.Append(cellFormat); workSheet.InsertAfter(objStyleSheetP, workSheet.Elements<SheetData>().First()); //***********Till Here********************
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)