Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Border option #42

Closed
N2ITN opened this issue Aug 14, 2018 · 4 comments
Closed

Default Border option #42

N2ITN opened this issue Aug 14, 2018 · 4 comments

Comments

@N2ITN
Copy link

N2ITN commented Aug 14, 2018

Is there a way to have the default Excel borders around cells?
Setting Styler(border_type=None) will eliminate borders around cells, but I want the default background grid.

@DeepSpace2
Copy link
Owner

DeepSpace2 commented Aug 14, 2018

This is an unfortunate side-effect of Styler defaulting to a white background ("Fill" in Excel terminology).
The workaround is to set fill_pattern_type=None when using a borderless style with the default fill/background color:

Styler(border_type=None, fill_pattern_type=None)

The permament solution could be to have Styler automatically set fill_pattern_type to None whenever it detects that border_type is None and bg_color is white, but then we may get someone who actually wants this behavior openning an issue 😉

@N2ITN
Copy link
Author

N2ITN commented Aug 14, 2018

Thank you!

@N2ITN N2ITN closed this as completed Aug 14, 2018
@DeepSpace2 DeepSpace2 reopened this Sep 4, 2018
@DeepSpace2 DeepSpace2 added this to the 2.0 milestone Sep 4, 2018
@DeepSpace2
Copy link
Owner

In a future version (hopefully 2.0) this will be the default behavior as it makes more sense.

@DeepSpace2 DeepSpace2 removed this from the 2.0 milestone Nov 30, 2018
@DeepSpace2 DeepSpace2 added this to the 3.0 milestone Apr 16, 2020
@DeepSpace2
Copy link
Owner

DeepSpace2 commented Apr 22, 2020

In version 3 there will be a shortcut to achieve this. Styler(border_type=utils.borders.default_grid) will be the equivallent for Styler(border_type=None, fill_pattern_type=None).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants