title: openxlsx currency style - Is there a rounding option?
body: <p>The <code>createStyle</code> function in the <code>openxlsx</code> package has an argument <code>numFmt</code>, which allows you to create an excel format to be applied to specific cells in a .xlsx file. You can round values by specifying <code>numFmt = '0'</code>, and you can apply a currency format by specifying <code>numFmt = "CURRENCY"</code>. </p>
  
  <p>Is there a way to specify a rounded currency format? 
  I've tried the following:</p>
  
  <ul>
  <li>Rounding the values in the data frame doesn't work, because the excel
  cells still display the cents e.g. <code>$103.00</code>.</li>
  <li><code>numfmt = 'CURRENCY0'</code> does not work</li>
  </ul>
  
  <p>If not, is there another package which allows you to specify the formats of excel cells, and allows rounding of currency-formatted cells?</p>
  
  <p>Edit:</p>
  
  <p>This gives me what I wanted (Currency format, with commas, no cents)</p>
  
  <pre><code>createStyle(numFmt="$0,0")
  </code></pre>