On 8 Jun 2021, at 11:59, Nicolas Rozain wrote:
I did this "hack" at it seems to work fine.
Could you tell me if this usage is risky? Do you intent to propose this in
future release?
One of the major changes in openpyxl 3.x was that the code for the various type of worksheet was harmonised, meaning that more features are likely to be supported. When it comes to write-only mode, pretty much anything that is stored in the XML after the cell data should be possible. Conversely, things like column formats have to be written before cell data and so are more difficult to deal. And the situation for read-only worksheets is reversed: you can look at column definitions but conditional formatting, etc. is at the bottom of the file largely negating any speed advantages.
There are, however, some challenges: if you want to use tables then you'll need to do some work yourself that openpyxl normally does. As the same could be true for other features I haven't got round to adding them yet but it should be fairly straightforward. Feel free to submit a PR… ;-)
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Waldlehne 23
Düsseldorf
D- 40489
Tel: +49-203-3925-0390
Mobile: +49-178-782-6226