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

Reuse similar-looking CellStyles #105

Open
orestis opened this issue Oct 11, 2022 · 1 comment
Open

Reuse similar-looking CellStyles #105

orestis opened this issue Oct 11, 2022 · 1 comment

Comments

@orestis
Copy link
Contributor

orestis commented Oct 11, 2022

A common issue when using Excel is that there is a limit of 64000 styles in an Excel document.

This means that at some point you need to reuse styles, you can't just be creating the same cell style and applying it. It gets worse if you're mutating already existing cell styles, e.g. to add a number format etc.

Apache POI has a CellUtil class that supposedly handles this, but during my testing it seemed buggy. What it does essentially is to just create a data structure out of a CellStyle, and iterate through the styles on the workbook to see if a class already exists.

Are you interested in adding a new function like (add-cell-style! cell style-map) that would do the same? Since create-cell-style! already accepts a data structure, the new function would support also generating the same data structure from an existing CellStyle.

@orestis
Copy link
Contributor Author

orestis commented Oct 11, 2022

(BTW I'm happy to provide a PR for this too!)

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

1 participant