Running the following code will not protect my worksheet. Am I doing something wrong or is this a bug?
Dim ms As New MemoryStream()Dim wb as new Workbook()
wb.SetCurrentFormat(WorkbookFormat.Excel2007)wb.Worksheets.Add("TEST WORKSHEET")wb.Worksheets.Last.Protected = TruepopulateWorksheet(wb.Worksheets.Last)wb.Save(ms)
Response.Clear()Response.AddHeader("Content-Type", "application/vnd.ms-excel")Response.AddHeader("content-disposition", "attachment; filename=test.xlsx")Response.BinaryWrite(rpt.ExcelSpreadSheet().ToArray())Response.End()