lunes-cms icon indicating copy to clipboard operation
lunes-cms copied to clipboard

excel list out of existing vocabulary in cms

Open jennyharmslunes opened this issue 1 year ago • 2 comments

Motivation

possibility to extract an excel list containing vocabulary already existing in the cms for each "berufsbild"

Proposed Solution

https://issues.tuerantuer.org/browse/IDEA-58

Alternatives

Additional Context

jennyharmslunes avatar May 04 '23 15:05 jennyharmslunes

@timoludwig I have tried a solution for this issue on the branch feature/export_to_excel. I didn't open a PR for it, because I'm not sure that what I have is the best solution for it. I tried using the csv library. After playing around with it for a while now, I'm not sure this is the best library for it, because of two reasons: a. the csv library only exports to csv files. I think in most cases this should be sufficient since Excel supports also csv, but there might be edge-cases in which we would need a .xls(x)-file and b. as far as I could tell it's not possible to create more than one CSV file. However I would expect, that if I select three disciplines that I get one csv file for every discipline (ideally also named after that discipline). But since the export works via the return of the response, I couldn't figure out a way to have more than one file. For now I appended all selected discipline in the same file (also not sorted). Do you think it's worth the effort to spend more time on the csv library and try to fix the mentioned issues or do you think I should rather try a different library (for example import-export or pandas)

JoeyStk avatar Jul 18 '23 14:07 JoeyStk

@JoeyStk Before trying to implement the export ourselves, I think we should first try to get this up and running:

https://django-import-export.readthedocs.io/en/latest/

If it doesn't work out for whatever reason, we can continue looking for alternatives that require more manual work.

timobrembeck avatar Jul 18 '23 20:07 timobrembeck