【发布时间】:2017-01-30 18:52:29
【问题描述】:
在旧版(Excel 互操作)代码中,可以为单元格分配自定义颜色:
contractCell.Interior.Color = ColorTranslator.ToOle(Color.FromArgb(202, 134, 250));
使用 Aspose Cells,我试图找到相应的方法来做到这一点。这段代码:
styleContractRow2.ForegroundColor = ColorTranslator.ToOle(Color.FromArgb(202, 134, 250));
styleContractRow2.Pattern = BackgroundType.Solid;
...不编译,告诉我,“无法将类型 'int' 隐式转换为 'System.Drawing.Color'”
那么如何在 Aspose Cells 中分配自定义颜色?
【问题讨论】:
标签: excel-interop aspose aspose-cells argb colortransform