Search code examples
rexcelword-wrapxlconnect

How can I use R and XLConnect to save XLSX spreadsheets WITHOUT wrapping text in cells?


The XLConnect library in R allows reading and writing to Microsoft Excel XLSX spreadsheet files.

However, when using writeWorksheet() or writeWorksheetToFile(), it automatically wraps the text in all cells. How do I turn off the text wrapping? Ideally, I'm looking for generating XLSX spreadsheets with no wrapped text and the optimal width for each column.

Thanks!


Solution

  • Solved this by switching to the xlsx package, which also has better syntax.