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

Individual Style Component Modification #1520

Closed
usuallyvexed opened this issue Apr 12, 2023 · 3 comments · Fixed by #1574
Closed

Individual Style Component Modification #1520

usuallyvexed opened this issue Apr 12, 2023 · 3 comments · Fixed by #1574

Comments

@usuallyvexed
Copy link

Would it be possible to have style related routines that change only a single aspect of a style for a cell, row, column?
For example:

SetCellFill(sheetName, startCell, endCell, fill-info)
SetCellFont(sheetName, startCell, endCell, font-info)
SetCellAlignment(sheetName, startCell, endCell, alignment-info)
SetCellBorders(sheetName, startCell, endCell, border-info)
etc.

Having the routines to alter individual components of an objects style saves a lot of work of having to create many different styles when you want to preserve all other components of the style save the one you want to change.

Thanks.

@xuri
Copy link
Member

xuri commented Apr 12, 2023

Thanks for your issue. The library has a plan to add support to get style definitions in the next released version (issue #314). After that the user can get existing cell style details by style index, and re-set style after modifying partial of styles to achieve merge or modify style this way.

@xuri xuri added the in progress Working in progress label May 23, 2023
@xuri xuri linked a pull request Aug 24, 2023 that will close this issue
10 tasks
xuri pushed a commit that referenced this issue Aug 24, 2023
- Add new function GetStyle support for get style definition
@xuri xuri removed the in progress Working in progress label Aug 24, 2023
@xuri
Copy link
Member

xuri commented Aug 25, 2023

The new function GetStyle has been added. Now, we can get style index at first, get the style definition with that, modify style definition and then re-set the style. Please try to upgrade the master branch code. This feature will be released in the next version.

@usuallyvexed
Copy link
Author

usuallyvexed commented Aug 27, 2023 via email

jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
…x-os#1574)

- Add new function GetStyle support for get style definition
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

Successfully merging a pull request may close this issue.

2 participants