excel - SoftArtisans 'Border.Part.Outline' 作为 SoftArtisans 'Border.Part.All' 工作
问题描述
SoftArtisans 库 - Excel 97
SoftArtisans 'Border.Part.Outline' 作为 SoftArtisans 'Border.Part.All' 工作。
说明:Excel 2016 '/Home/Outside Borders' 选项相当于 SoftArtisans 'Border.Part.Outline' 问题很简单。这永远不会按预期工作。
如果我们得到一些单元格范围,例如从 1 到 10 -> rows[1:10] 而不合并这些范围单元格,则将边框“ Border.Part.Outline ”选项设置为“ Border.Part.All ”,这是错误的。
这里有一些伪代码:
var myRange = getMyCustRange(myRows[1:10]);
Style mystyle = Workbook.GlobalStyle.CreateStyle();
// If I want to clear border
mystyle.Border[Border.Part.All] = Border.LineStyle.None; // test pass, worked!
// If I want to set border to all cell part of the current range
mystyle.Border[Border.Part.All] = Border.LineStyle.Thin; // test pass, worked!
// If I want to remove Outside Borders
mystyle.Border[Border.Part.Outline] = Border.LineStyle.None; // test pass, worked!
// If I want to set only Outside Borders into current range with more than one rows and thoose rows are not merged -> Area.MergeCells();
mystyle.Border[Border.Part.Outline] = Border.LineStyle.Thin; // test FAILED!!!
// Part : TypesafeEnum
Border.Part All;
Border.Part Bottom;
Border.Part DiagonalBoth;
Border.Part DiagonalDown;
Border.Part DiagonalUp;
Border.Part Left;
Border.Part Outline;
Border.Part Right;
Border.Part Top;
解决方案
推荐阅读
- filter - Halcon - 什么是最快的模糊滤镜可用
- reactjs - 如何将大量数据从spring boot加载到reactjs?
- google-maps - Google VMS - 车辆地图服务
- azure - 您如何知道您正在访问哪个 Azure 应用服务实例?
- php - 我如何从这种类型的数据库中制作播种机 [Laravel]
- python - Pypsark 解压缩具有不同长度的嵌套字符串列表的列
- uwp - UWP 应用程序 - 在商店发布后是否可以删除提交
- ios - 应用构建成功,上传显示成功但未显示在应用商店连接/我的应用/活动选项卡上?
- typescript - 是否可以使用 Paperjs 在同一路径中使用不同的笔触颜色绘制图形?
- list - 如何使用类在列表中插入数据?