【问题标题】:copy background color of first row复制第一行的背景颜色
【发布时间】:2018-09-15 02:14:35
【问题描述】:

关于 id 如何在我的 excel 表中实现第一行(标题)的背景颜色的任何想法?

XSSFWorkbook Workbook = new XSSFWorkbook();
ISheet DeliveryReportsSheet = Workbook.CreateSheet("Upcoming Schedules");
int rowCounter = 0;
IRow Headers = DeliveryReportsSheet.CreateRow(rowCounter);

Headers.CreateCell(0).SetCellValue("Resource ID");
Headers.CreateCell(1).SetCellValue("Schedule Name");
Headers.CreateCell(2).SetCellValue("Task Name");
Headers.CreateCell(3).SetCellValue("Next Trigger Date Launch");

【问题讨论】:

  • 行标题和列标题?或者,您想将相同的填充颜色从第 1 行复制到第 2 行等??
  • 老兄 - 你必须阅读 hwo 才能在这里提问。基本上,这与您所做的相反。我从标题中删除了问题,但您需要添加更多信息。请参阅 How to Askminimal reproducible examplehelp center
  • 只有行和列标题
  • 我只是想再次确保您在谈论 Excel 的行标题和列标题.. Click Here to see this image你只想匹配那个颜色?

标签: c# excel formatting copy background-color


【解决方案1】:

一种匹配 Excel 行和列标题(计算机上的任何其他内容)颜色的简单方法是截取屏幕截图并将其上传到ImageColorPicker.com,您可以在其中单击图像的像素来确定颜色。

Excel 标题颜色因版本而异。我在 Excel 2016/365 中包含的图片,颜色为:

HTML: #E6E6E6
RGB: (230,230,230)

【讨论】:

    猜你喜欢
    • 2014-08-09
    • 1970-01-01
    • 1970-01-01
    • 2017-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-19
    • 2020-03-15
    相关资源
    最近更新 更多