NorwegianVeterinaryInstitute / NVIpretty

Making R-output pretty in accord with NVI design
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Include argument for date format in add_formatted_worksheet #22

Open PetterHopp opened 1 year ago

PetterHopp commented 1 year ago

In openxlsx from version ###, the standard date format is set to American, i.e. mm.dd.YYYY. Problemet er OPENXLSX som er satt opp med amerikanske format: «mm.dd.yyyy» Problemet oppstod ved eller annen oppdatering: https://github.com/ycphs/openxlsx/issues/362

Løsningen er å sette formatet slik man ønsker det: https://ycphs.github.io/openxlsx/articles/Introduction.html

Du finner formatet slik:

openxlsx_getOp("dateFormat", "date")

Og endrer slik

options("openxlsx.dateFormat" = "dd/mm/yyyy")

Suggested solution: Make an argument for setting date format. Set default format to Windows format, but needs a way of retrieving the Windows format. Alternatively, set default format to Norwegian format.