title: openxlsx uses different tablestyles from my normal Excel application
body: <p>I wanted to create an excel-file containing a table with a specific formatting. I used the <code>openxlsx</code>-package and looked in another excel-file for the name of the table style I wanted to use. After saving the new file, the table style was different than I expected. Furthermore all table styles in that document were different from what I normally have (different order and slightly different colors) and there is no way to change it to the style I want to use.</p>
  
  <p>Can someone explain where the difference come from and how I can use the normal table styles? I am using Excel 2016.</p>
  
  <p><strong>example code for creating a table:</strong></p>
  
  <pre><code>library(openxlsx)
  df &lt;- data.frame(V1 = 1:2, V2 = letters[1:2])
  
  wb &lt;- createWorkbook()
  addWorksheet(wb, 1)
  writeDataTable(wb, 1, x = df, tableStyle = "TableStyleMedium7")
  
  saveWorkbook(wb, file = "test.xlsx", overwrite = TRUE)
  </code></pre>
  
  <p><strong>My normal table styles:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/XMnUT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XMnUT.png" alt="enter image description here"></a></p>
  
  <p><strong>openxlsx table styles:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/0a1t7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0a1t7.png" alt="enter image description here"></a></p>