Hello everybody,
I am trying to format an excel file with R, which seems to me a quite
hideous task.
However, I am using the 'xlsx' package, and I want to change the color
of the bottom line without erasing the existing style of a cell. I ran
the following code, but it gives me an error and I can't get it to work.
wb <- xlsx:::loadWorkbook(file = "Data/test.xlsx")
sheet <- xlsx:::getSheets(wb)[[1]]
rows <- xlsx:::getRows(sheet, rowIndex=1)
cell.1 <- xlsx:::getCells(rows, colIndex=1)[[1]]
cs <- xlsx:::getCellStyle(cell.1) + Border(color = "green", position =
"BOTTOM")
Error in xlsx:::getCellStyle(cell.1) + Border(color = "green", position =
"BOTTOM") :
non-numeric argument to binary operator
What am I doing wrong? Can anyone please help me.
Thank you very much!
Sincerely,
Sören
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.