You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In converting code from pandas to Polars, I neglected to see that Polars adds autofilters by default in write_excel. My prior code was adding autofilters manually via xlsxwriter. Thus switching to Polars, autofilters were being added twice. The Python code ran fine, but when opening the resulting workbook Excel needed to repair the file. The log stated:
Removed Feature: AutoFilter from /xl/tables/table1.xml part (Table)
Removed Feature: Table from /xl/tables/table1.xml part (Table)
Took me a bit to figure out what was going on.
Expected behavior
Not necessarily expected, but perhaps more desirable would be for xlsxwriter to detect the situation (assuming my diagnosis is correct - which I am not certain of) and raise an informative error message.
Not sure if this is feasible - if it isn't, then I thought just having this (closed) issue with the error message would possibly let others stumble upon a potential somewhat common case (switching from pandas to Polars).
The library doesn't allow 2 worksheet autofilters (since Excel doesn't allow it) but it doesn't prevent a worksheet autofilter and a table autofilter from overlapping (which it should do). I'll fix that.
Current behavior
In converting code from pandas to Polars, I neglected to see that Polars adds autofilters by default in write_excel. My prior code was adding autofilters manually via xlsxwriter. Thus switching to Polars, autofilters were being added twice. The Python code ran fine, but when opening the resulting workbook Excel needed to repair the file. The log stated:
Took me a bit to figure out what was going on.
Expected behavior
Not necessarily expected, but perhaps more desirable would be for xlsxwriter to detect the situation (assuming my diagnosis is correct - which I am not certain of) and raise an informative error message.
Not sure if this is feasible - if it isn't, then I thought just having this (closed) issue with the error message would possibly let others stumble upon a potential somewhat common case (switching from pandas to Polars).
Sample code to reproduce
Environment
Any other information
This might be similar to:
OpenOffice and LibreOffice users
The text was updated successfully, but these errors were encountered: