title: How to align the cells of an XLSX file using R's xlsx package?
body: <p>When creating an XLSX file using R's xlsx package, by default, columns with strings are justified to the left by default, and columns with integers are justified to the right (columns with a mix of integers and strings are also justified to the left). Ultimately, I want to standardize all columns by aligning them all to the left, but I'm having trouble doing so using xlsx. Using the below example, how can I align all cells to the left?</p>
  
  <pre><code>library(xlsx)
  
  # Creating dataframe.
  df &lt;- data.frame(c(1, 2, 3),
                   c("one", "two", "three"),
                   c("1", "2", "3"))
  
  # Creating a workbook using the XLSX package.
  wb &lt;- xlsx::createWorkbook(type = "xlsx")
  
  # Creating a sheet inside the workbook.
  sheet &lt;- xlsx::createSheet(wb, sheetName = "Sheet0")
  
  # Adding the full dataset into the sheet.
  xlsx::addDataFrame(df, sheet, startRow = 1, startCol = 1, row.names = FALSE, col.names = FALSE)
  
  # Saving the workbook.
  xlsx::saveWorkbook(wb, "df.xlsx")
  </code></pre>