marcschwartz / WriteXLS

CRAN Package WriteXLS: 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 written to a separate named worksheet in the Excel spreadsheet. The worksheet name will be the name of the data frame it contains or can be specified by the user.
GNU General Public License v2.0
19 stars 9 forks source link

WRITEXLS COMMENT: shows up as first row when row.names=T #1

Closed robertdzeigler closed 11 years ago

robertdzeigler commented 11 years ago

The current comment row detection method is faulty because it only examines the first field. But if row.names=T, the first field is the row name, even for comment columns. A better solution might be to grep through the fields in the row for the "WRITEXLS COMMENT:" string and check if the resulting array size is > 0.

marcschwartz commented 11 years ago

Robert, thanks for the heads up on this. I will reply with more detail in your proposed fix post.