title: Center align using xlsxwriter (without conditional formatting)
body: <p>Using xlsxwriter, one can write a dataframe 'df' to Excel 'simple.xlsx' using code such as:</p>
  
  <pre><code>import pandas as pd
  writer = pd.ExcelWriter('simple.xlsx', engine='xlsxwriter')
  df.to_excel(writer, sheet_name='Sheet1')
  writer.save()
  </code></pre>
  
  <p>With above code, I see that the resultant Excel sheet has all cells (except header) as default left-aligned.</p>
  
  <p>Question:</p>
  
  <p>How can I make the Excel cell values to be center-aligned?
  I did explore using conditional formatting but, with my cell values being combination of blanks, zeros, floats, strings and integers, I am wondering if there is another way.
  Is there a smarter/quick way to do either/both of the following:</p>
  
  <ul>
  <li><p>Any way to write dataframe to Excel as center-aligned? Or..</p></li>
  <li><p>Any way to center-align the Excel sheet (for the cell range occupied by dataframe) once the dataframe has already been written to Excel?</p></li>
  </ul>