jellyfin / jellyfin-plugin-reports

Reports Plugin for Jellyfin
https://jellyfin.org
MIT License
29 stars 18 forks source link

Add XLSX Excel As Export Option #74

Closed mwildgoose closed 1 year ago

mwildgoose commented 1 year ago

The current Excel export option doesn't actually generate an Excel file, it generates a HTML file with the XLS extension. This produces a warning as noted in issue #64.

This pull request adds a new Excel XLSX export option and rebrands the old XLS option as a HTML export.

This allows for using Excel-specific features, such as:

new_export_excel

I've aligned the export buttons into a single row so it doesn't take up too much space in the UI (as the column list is already overflowing off the page): Old Export Box New Export Box
old_export_box new_export_box
crobibero commented 1 year ago

I appreciate the effort that went into this PR. I would prefer to use a library to write actual excel files because the base xml seems like it will be very difficult to maintain.

Preferred library: https://github.com/ClosedXML/ClosedXML If that doesn't work: https://github.com/EPPlusSoftware/EPPlus (not completely FOSS license)

mwildgoose commented 1 year ago

Thanks for the feedback, ClosedXML does make the code a lot cleaner. Only downsides are that it's increased the plugin size from 170KB to 7.2MB and the ClosedXML column autofit implementation doesn't work on Linux (see this issue) so I've commented that out for now.

crobibero commented 1 year ago

Bummer that the feature doesn't work.. but I confirmed that the plugin works as expected. Thanks!