Please create a method for optimized style copying

Issue #1065 wontfix
David Gilman
created an issue

If you want to clone styles with the public API you're stuck doing copies for each style individually. This is extremely slow if you're doing it many times or in an inner loop. It's also a bit fragile if new kinds of styles are introduced in the future. Please consider adding a method that does a copy() on the internal _style array for you which is much faster. I believe there is at least some demand for this API: I have a project where I have to do a bunch of copies and benefited from the optimization quite a bit. There is also a somewhat popular StackOverflow question where people are asking for a way to do this so I think there is some public demand as well. I don't know the library as well as you do but you already do the same thing in the WorksheetCopy class so I imagine this approach is safe to do.

Comments (3)

  1. Log in to comment