为什么我的样式没有应用到我的范围 (Aspose Cells)?

Why is my style not being applied to my range (Aspose Cells)?

我正在创建一个范围,给它一个值,然后像这样设置它的样式:

private string fontForSheets = "Calibri";

Range unitNameRange = locationWorksheet.Cells.CreateRange("A1", "D1");

unitNameRange.PutValue(_unit, false, true); // val, isConverted, SetStyle. Don't know if these bools are right...
CellsFactory cf = new CellsFactory();
Style style = cf.CreateStyle();
style.HorizontalAlignment = TextAlignmentType.Left;
style.Font.Name = fontForSheets;
style.Font.IsBold = true;
style.Font.Size = 14;
unitNameRange.SetStyle(style);

但样式不是 "taking" - 值是简单、通用的文本;它是 Arial 10,没有粗体。我怎样才能让样式符合范围?

第二个或第三个或两者都错了吗?我在猜测何时将 isConverted 设置为 false 并将 SetStyle 设置为 true...

check the reply related to this issue在以下Aspose.Cells论坛。

注意:我在 Aspose 担任开发人员布道师