officewriter

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

梦想与她 提交于 2019-12-23 04:46:04
问题 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;