You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a integerField, the excel column will be number
but if I have a method in my model or serializer that return int, the excel column will be text
for ex:
and a serializer with all fields, duration column will be number but total_price will be text
I seek in documentation but I didn't find a solution
use format for column data style does not work
The text was updated successfully, but these errors were encountered:
@aliqb I was having a similar issue. I think the problem might be with the type of field, if you check the _drf_to_xlsx_field function, there is a list of conditions that based on the type of field, it will assign a XLSX field. So here it checks for numeric fields. If there is no match, it will use the default field. So you probably need to make sure that your Serializer field is of numeric type.
If I have a integerField, the excel column will be number
but if I have a method in my model or serializer that return int, the excel column will be text
for ex:
and a serializer with all fields, duration column will be number but total_price will be text
I seek in documentation but I didn't find a solution
use format for column data style does not work
The text was updated successfully, but these errors were encountered: