- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
考虑 r 包 openxlsx 中的以下代码块。
我正在尝试用特定颜色填充 Excel 电子表格中的某些单元格。
这是我用来执行此操作的代码。
library(openxlsx)
# Create a new workbook
wb <- createWorkbook("My name here")
# Add a worksheets
addWorksheet(wb, "Expenditure", gridLines = FALSE)
addWorksheet(wb, "Income", gridLines = FALSE)
# write data to worksheet 1
writeData(wb, sheet = 1, USPersonalExpenditure, rowNames = TRUE)
# Create style object in order to fill certain cells in the excel spreadsheet.
Styling_object <- createStyle(fontColour = "red", bgFill = "yellow")
# Add style to cell in row 2 column 1.
addStyle(wb, sheet = 1, style = Styling_object, rows = 2, cols = 3)
# Add style to cell in row 4 column 3.
addStyle(wb, sheet = 1, style = Styling_object, rows = 4, cols = 3)
# save the workbook
saveWorkbook(wb, "testing_add_style_1.xlsx", overwrite = TRUE)
我不明白的是为什么我指定要在 excel 表中填充的单元格填充了错误的颜色。我将 createStyle
中的 bgfill
参数指定为“黄色”,这是我想要指定单元格的填充颜色,但由于某种原因,该单元格填充了黑色生成的 Excel 电子表格中的颜色。
这是我在 Excel 电子表格中得到的。
虽然它应该看起来像这样:
最佳答案
使用 fgFill
而不是 bgFill
。 bgFill
用于条件格式。
Styling_object <- createStyle(fontColour = "red", fgFill = "yellow")
关于r - openxlsx 中的 addStyle 函数不会用正确的颜色填充 excel 电子表格中的单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71600719/
我正在尝试添加这样的样式: import './landing.css'; 或 import { someClass } from "./landing.css"; 在 React 组件中出现此错误:
考虑 r 包 openxlsx 中的以下代码块。 我正在尝试用特定颜色填充 Excel 电子表格中的某些单元格。 这是我用来执行此操作的代码。 library(openxlsx) # Create a
./app/index.scss 中的错误 找不到模块:错误:无法解析"file"或“目录”./../node_modules C:\Users\johnliang\Temp\webpack-angu
我正在使用 React 16.4.2 构建应用程序,不幸的是,我在安装 Bootstrap 4 后收到此错误消息(通过 npm: np install Bootstrap ): Failed to c
我是一名优秀的程序员,十分优秀!