Skip to content

ENH: Make ExcelWriter more easily pluggable #4745

Closed
@jtratner

Description

@jtratner

Basically, make a clear interface for ExcelWriter and allow others to plug into it. Unfortunately, it looks like we're stuck with using ExcelWriter directly as a class, so might take a bit more complexity to stick this in (i.e., a metaclass). If we can convert it to a function instead, can make a lot less magic. Check out this branch if you want to see what I'm talking about.

We'd end up with a separate config option for each extension (io.excel.xlsx.writer, io.excel.xls.writer, io.excel.xlsm.writer) (can't do the reverse because io.excel.writer.xls would match all the different filetypes).

Client code then just has to implement save and write_cells and define supported_extensions and register their their class with register_engine in pandas/io/excel, then it's easily available under to_excel as an engine parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions