Open mjmare opened 1 year ago
dataset_kwargs
is passed as keyword arguments to the Dataset
:
tablib does not support setting the export format on the Dataset
, which makes sense as that would couple it to a certain export format (CSV
).
I suspected your example would only work to export to CSV, because the xlsx format does not support the delimiter
kwarg, but apparently, unsupported kwargs are ignored.
We could fix this by adding another dict on ExportMixin
which is passed to dataset.export()
, but I'd say your custom TableExport
class already looks like a good fix for non-standard use cases?
My example is CSV only indeed. My workaround works but overriding a class just to provide the delimiter kwart felt a bit heavy handed.
It seems that
TableExport
's parameterdata_kwargs
is not honoured when exporting a table.I had to create this workaround in order to be able to set the delimiter: