diff --git a/DESCRIPTION b/DESCRIPTION index dedb864..b9cdb65 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: WriteXLS -Version: 3.2.1 -Date: 2013-08-08 +Version: 3.2.2 +Date: 2013-11-12 Title: Cross-platform Perl based R function to create Excel 2003 (XLS) and Excel 2007 (XLSX) files Description: Cross-platform Perl based R function to create Excel 2003 (XLS) and Excel 2007 (XLSX) files from one or more data frames. Each data frame will be diff --git a/R/WriteXLS.R b/R/WriteXLS.R index 0df2961..65fa52b 100644 --- a/R/WriteXLS.R +++ b/R/WriteXLS.R @@ -185,8 +185,10 @@ WriteXLS <- function(x, ExcelFileName = "R.xls", SheetNames = NULL, perl = "perl # Everything is going to be output via write.table() as character anyway. # Preserve the rownames from the original DF.LIST, lest they get # re-named to numbers by default. + # Set 'optional = TRUE' so that make.names() is not used on non-syntactially + # correct column names. DF.LIST[[i]] <- as.data.frame(lapply(DF.LIST[[i]], as.character), - stringsAsFactors = FALSE, + stringsAsFactors = FALSE, optional = TRUE, row.names = rownames(DF.LIST[[i]])) # Pre-pend "WRITEXLS COMMENT:" to each comment so that we can differentiate