title: How to color cells with write.xlsx (simple example)
body: <p>I'm writing an R data frame to an .xlsx file.  </p>
  
  <p>I'd like certain cells to be filled in with color.  I'm using the <code>xlsx</code> package in R, and I'm finding the manual difficult to digest.  Here's a simple example:</p>
  
  <pre><code>data(cars)
  write.xlsx(cars, "cars.xlsx")
  </code></pre>
  
  <p>Then, I'd like to fill in the cells where <code>dist</code> is between 20 and 25, e.g.</p>
  
  <p>Because I simply have a data frame that I directly write using <code>write.xlsx</code>, I don't have a workbook java object.  </p>
  
  <p>So, I don't think that the examples in <code>?CellStyle</code> will work for this case.  </p>
  
  <p>I'd love if there is an easy way to, e.g., define a cell style using arguments of <code>write.xlsx</code>, or by selecting cells in a data frame (i.e., not in a java object workbook). </p>