Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement thousands comma-separators by default #51

Open
matt-dray opened this issue Mar 16, 2022 · 3 comments
Open

Implement thousands comma-separators by default #51

matt-dray opened this issue Mar 16, 2022 · 3 comments
Labels
accessibility Meeting the guidelines enhancement New feature or request
Milestone

Comments

@matt-dray
Copy link
Collaborator

There has been a request to:

...implement comma separated thousands format in the workbook, using openxlsx::createStyle(numFmt = “COMMA”) as per the guidance.

(Also, this is a reminder to look over the guidance in detail to extract all these kinds of cell-level features.)

@matt-dray matt-dray added enhancement New feature or request accessibility Meeting the guidelines labels Mar 16, 2022
@matt-dray
Copy link
Collaborator Author

This is kind of complex. The styling will occur when the column is full of numerics, but if it's character due to to a suppressed value, then the commas won't be shown.

Screenshot 2022-03-21 at 14 31 36

Probably means that the thousands-separator styling will have to be dynamically applied by identifying the rows that have numbers in (e.g. coerce them to numeric and see if a non-NA result emerges).

@matt-dray matt-dray added this to the v0.2.0 milestone Jun 16, 2022
@matt-dray
Copy link
Collaborator Author

Note the options for {openxlsx} could also be set to allow for the comma separator, as mentioned in #69, but this still won't work with columns that contain a placeholder or other string content.

@matt-dray
Copy link
Collaborator Author

Consider applying scales::number() if it needs to be done manually in some way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Meeting the guidelines enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant