Click here to Skip to main content
15,908,673 members

Comments by chiaracat (Top 2 by date)

chiaracat 16-Oct-23 6:41am View    
Thanks you for you update but I don't find the property to set to lock a cell.
You write

... SelectLockedCells = true,...

but how can I lock into sheet?

Thanks
chiaracat 11-Oct-23 7:04am View    
I have set

CellFormat lockFormat = new CellFormat() {
ApplyProtection = true,
Protection = new Protection() {
Locked = true
}
};

and append this to WorkbookStylesPart

sp.Stylesheet.CellFormats.AppendChild <cellformat> (lockFormat);

but I dont know how lock cells

Thanks