title: Write multiple Data Frames in one Excel Sheet in R using XLConnect
body: <p>I have two different data frame with variable no of rows and columns.
  For eg :-</p>
  
  <pre><code>exceldataframe &lt;- data.frame(matrix(ncol = 8, nrow = 0), stringsAsFactors=F)
  colnames(exceldataframe) &lt;- c( "Subject", "Session", "thermal data", "pp", "HR", "BR", "peda","performance(res)")
  wb = loadWorkbook("MYDataSet.xlsx", create = TRUE)
  createSheet(wb, name = "DataSheet")
  
  statisticsFrame &lt;- data.frame(matrix(ncol = 6, nrow = 5), stringsAsFactors=F)
  colnames(statisticsFrame) &lt;- c("thermal data", "pp", "HR", "BR", "peda","performance(res)")
  row.names(statisticsFrame) &lt;- c("Valid", "Invalid", "Missing", "Not Applicable", "Sum")
  </code></pre>
  
  <p>I want to write exceldataframe first and then append after some rows the statisticsframe. Although statistics frame is getting appended but i want to leave spaces after first frame i.e excel data frame. Also I want to name the rows of excel while appending statistics data frame. Like rows should be named as Valid,Invalid etc.
  I have written the following code :-</p>
  
  <pre><code>  writeWorksheet(wb, exceldataframe, sheet = "DataSheet", startRow = 1, startCol = 1)
    print(statisticsFrame)
    appendWorksheet(wb,statisticsFrame, sheet = "DataSheet", header = TRUE, rownames = TRUE)
    saveWorkbook(wb)
  </code></pre>
  
  <p>This appends the file but rownames are not being shown even after rownames = TRUE.Thanks!</p>