ycphs/openxlsx

If `x` is a `table` without row names, `writeData(x)` produces an extra column with weird artificial values.

Closed this issue · 2 comments

Describe the bug
If x is a table without row names, writeData(x) produces an extra column with weird artificial values.

The issue is with

openxlsxCoerce.table <- function(x, rowNames) {
x <- as.data.frame(unclass(x))
x <- cbind(data.frame("Variable" = rownames(x), stringsAsFactors = FALSE), x)
names(x)[1] <- ""
return(x)
}

since in that case rownames(x) creates the weird values added to the data.frame through "Variable", so not removable by means of rowNames=FALSE.

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

This issue was closed because it has been stalled for 7 days with no activity.