Skip to content

Cell formatting functions #559

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

Open
zoquda opened this issue Sep 3, 2016 · 11 comments
Open

Cell formatting functions #559

zoquda opened this issue Sep 3, 2016 · 11 comments

Comments

@zoquda
Copy link
Contributor

zoquda commented Sep 3, 2016

It would be really great if additional functions for changing cell formatting could be implemented. In my personal opinion the most important cell formatting characteristics that are currently still unsupported are:

  • font type
  • font size
  • font style (bold / italic / underline)
  • font color
  • text alignment
  • borders
@fzumstein
Copy link
Member

sure, it's on the list, it's also at the top here

@surfmaverick
Copy link

Hi Felix - this page is emtpy:

http://docs.xlwings.org/missing_features.html

@fzumstein
Copy link
Member

It changed to: http://docs.xlwings.org/en/stable/missing_features.html, I'll update it on uservoice

@zoquda
Copy link
Contributor Author

zoquda commented Sep 5, 2016

Thanks for pointing out the uservoice page. I've added my vote.

@LiaungYip
Copy link

More detail on the workarounds is at: http://nbviewer.jupyter.org/github/pybokeh/jupyter_notebooks/blob/master/xlwings/Excel_Formatting.ipynb
which includes specific examples i.e. how to apply borders, change font size, colours, etc.

@LiaungYip
Copy link

@fzumstein , suppose that someone wanted to add formatting support to xlwings.

What should the API look like?

Refer #302 where some preferences were expressed.

@fzumstein
Copy link
Member

I think that comment is still right, the whole api is now very close to the original, so no need to deviate for font etc.

@rkpatel33
Copy link

Does anyone have examples similar to the Jupyter notebook above but for OSX/Mac Excel? Specifically I'm trying to set the font color of a cell or range. Even just that snippet would be helpful, thanks!

@fzumstein
Copy link
Member

You can workaround like this:

import xlwings as xw

rgb_tuple = (255, 0, 0)
xw.Range('A1').api.font_object.color.set(rgb_tuple)

@rkpatel33
Copy link

rkpatel33 commented Apr 26, 2017 via email

@fzumstein
Copy link
Member

0.23.0 added support for these:

  • font type, aka name
  • font size
  • font style (bold / italic)
  • font color

so only the following missing from this list:

  • font style (underline)
  • text alignment
  • borders

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

No branches or pull requests

5 participants