Closed kwatog closed 2 years ago
It currently does not, as we are limited by the data passed to the renderer from Django REST Framework. I'm open to ideas, however. We may be able to pass styles to OpenPyXL.
This XLSX rendering solution is great!
I also have a formatting issue. All my numerical columns are being interpreted as text, causing Excel to flag them as "Number Stored as Text" with a warning.
I'd like to format my cells, and I can follow an approach like setting styles as appropriate in my get_column_header()
or get_body()
methods (e.g. based on known or examined data formats, or based on column naming conventions). However, I cannot figure out what OpenPyXL styles to set to make this happen. number_format
does not appear to work. Any suggestions?
@Tigven did the work on customizing styles, and he may have more information... or thoughts on how it can be accomplished.
@FlipperPA we were using an older version, so we upgraded to 0.3.2 (from 0.3.0) and that happened to also fix the problem we were having of numeric fields being interpreted as text fields, so thanks to whoever fixed this!
@Renegade9 Fantastic to hear! Team work makes the dream work. :)
Hello @FlipperPA has there been any movement on adding styles to specific columns?
@ProgrammingJoe There hasn't, as my organization doesn't have a need for the feature (yet) so I haven't had time to look into it. I've added a note to the README about how we prioritize feature requests.
@ProgrammingJoe @kwatog @Renegade9 Hey folks! This is now supported in version 2.0.0.
does it support formatting for specific columns? Example, left align for text columns and right align for numbers.