Am .08.2018, 19:54 Uhr, schrieb Andy Yee <
jpowe...@gmail.com>:
> Thank you Charlie. The script was posted in the event it would help to
> reference. File naming conventions noted for next time.
>
> 1. The radio button control type is the same on all sheets where they
> appear. The file named "*...loaded..*." is the original source file
> before it was written to. Radio buttons are visible on all sheets where
> they
> exist including tab (j) Atmospheric Tanks. The file named "*...after
> saving..*." is the file that was written to & saved by openpyxl. In
> Excel 2013 I see radio buttons on tab (b) but not tab (j). Same Excel
> control
> type but different behavior. This is why I don't think it is a case of
> control types not supported by openpyxl - the radio button are preserved
> on some sheets (like tab (b) Pneumatic Devices) but not on others (like
> tab
> (j) Atmospheric Tanks).
>
> 2. I will see about upgrading to Excel 2016 to check the processed file
> again. I will post an update as to whether a change in Excel versions
> fixes the problem.
It may fix the error raised by Excel, but it won't fix the missing
controls. The current handling of VBA and its associated items is "best
try" with no guarantee and relies heavily on preserving the structure of
the original archive, which openpyxl does not guarantee. If you compare
(you can try the OOXML Productivity Tool for this but be warned it's very
slow for these files) the file structure of the two files, you'll notice
that some files are preserved, while other's aren't. This can probably be
largely fixed by extending the library to support the control properties
XML.