django-commons / drf-excel

An XLSX spreadsheet renderer for Django REST Framework.
BSD 3-Clause "New" or "Revised" License
217 stars 40 forks source link

Feature Request: Support nested arrays #44

Open jvacek opened 2 years ago

jvacek commented 2 years ago

I work a lot with related fields which are 1-M, and currently anything that is an array of objects just gets the whole child json dumped into one field.

It would be nice to have some further "flatification" in one way or another

I can imagine two sensible ways to do this nonsense I'm describing:

willtho89 commented 2 years ago

@jvacek 1NF tables seems to be the most easiest way to implement it, but the file gets big easily on highly nested serializers. The 2NF approach seems more reasonable but I have never worked on linked sheets.

I'll leave this open in case someone wants to give it a shot.

rptmat57 commented 2 years ago

This would be a really nice feature to have. I use drf-flex-fields to expand related fields on demand, and it just breaks when trying to export in XLSX after expanding any field. this would probably fix the issue