天道酬勤,学无止境

officewriter

ExcelWriter.Style CellLocked - 为什么它不起作用?(ExcelWriter.Style CellLocked - why won't it work?)

问题 我正在尝试使用 #officewriter #excelwriter 创建一个简单的示例,但在使用样式时遇到问题。 不知道为什么。 ExcelApplication XLAPP = new ExcelApplication(); Workbook WB = XLAPP.Create(); Worksheet WKST = WB.Worksheets[0]; DataSet ds = <...some valid dataset with 2 columns....> 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

2021-08-12 00:37:18    分类:技术分享    c#   styles   officewriter

ExcelWriter.Style CellLocked - why won't it work?

I'm trying to create a simple example with #officewriter #excelwriter and having trouble using the styles. Not sure why. ExcelApplication XLAPP = new ExcelApplication(); Workbook WB = XLAPP.Create(); Worksheet WKST = WB.Worksheets[0]; DataSet ds = <...some valid dataset with 2 columns....> 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

2021-07-09 16:02:14    分类:问答    c#   styles   officewriter