ropensci / writexl

Portable, light-weight data frame to xlsx exporter for R
https://docs.ropensci.org/writexl
Other
210 stars 17 forks source link

Format of column names when using write_xlsx() #14

Closed marcelbaumgartner closed 6 years ago

marcelbaumgartner commented 6 years ago

Hello,

when using write_xlsx(), the column names in Excel are formatted, in bold and centered. This generates issue when we want to import the Excel file into one of software applications. Wouldn't it be possible not to format this line? Or provide this option? Thanks!

jeroen commented 6 years ago

Can you just get your software to ignore the formatting?

marcelbaumgartner commented 6 years ago

For the software in question, the answer is no. I still think that you should extract an Excel file with zero formatting ... but all this is a nice to have! And write_xlsx() is super useful!

uwdk commented 6 years ago

@marcelbaumgartner - You can change/remove the column name formatting by editing this: https://github.com/ropensci/writexl/blob/5ef824740bf79d679047654bc8c7dbacb3a6aa57/src/write_xlsx.c#L86-L89

msberends commented 6 years ago

That could’ve been the answer of jeroen. Anyway, :+1:

marcelbaumgartner commented 6 years ago

Thanks, sounds great! However, seems difficult to do on Windows. But again, all nice to have and happy that you close this "issue". Cheers!

danielsjf commented 6 years ago

I would also think that having the least amount of formatting in the default behavior is the best. I think many people use excel outputs to feed other tools. They usually complain when something is off. I had the same situation today.