Tag: officewriter

ExcelWriter.Style CellLocked – 为什么它不起作用?

我正在尝试使用#officewriter #excelwriter创建一个简单的示例,并且无法使用这些样式。 不知道为什么。 ExcelApplication XLAPP = new ExcelApplication(); Workbook WB = XLAPP.Create(); Worksheet WKST = WB.Worksheets[0]; DataSet ds = DataView dv = ds.Tables[0].DefaultView; DataImportProperties props = WB.CreateDataImportProperties(); SoftArtisans.OfficeWriter.ExcelWriter.Style dataStyle = WB.CreateStyle(); props.UseColumnNames = true; dataStyle.BackgroundColor = Color.SystemColor.Red; dataStyle.CellLocked = true; Area importArea = WKST.ImportData(dv, WKST.Cells[0, 0],props); importArea.ApplyStyle(dataStyle); XLAPP.Save(WB, Page.Response, “Output.xls”, false); 这是问题所在:颜色样式在输出中起作用,但CellLocked样式不起作用。 为什么? 谢谢你的帮助。 沮丧 […]