activex control changing to picture

236 views
Skip to first unread message

jdew...@gmail.com

unread,
Oct 25, 2017, 9:11:50 AM10/25/17
to openpyxl-users
Hello,

I have a problem when I have  activeX Controls in my xlsm file

The ActiveX controls are changing to picture.

My Simple code : 
from openpyxl import load_workbook
oriDoc = '../exemple/testBtn.xlsm';
destDoc = '../exemple/testBtn_new.xlsm';
wb = load_workbook(oriDoc, read_only=False, keep_vba=True)
wb.save(destDoc)

The result in attachment "activeXToPicture.png".

Is it possible to preserve ActiveX control with openpyxl ?

Regards,

Jean-Christophe
activeXToPicture.png

Charlie Clark

unread,
Oct 25, 2017, 1:25:01 PM10/25/17
to openpyx...@googlegroups.com
Am .10.2017, 15:11 Uhr, schrieb <jdew...@gmail.com>:

> Hello,
>
> I have a problem when I have activeX Controls in my xlsm file
>
> The ActiveX controls are changing to picture.
>
> My Simple code :
> *from openpyxl import load_workbook*
> *oriDoc = '../exemple/testBtn.xlsm';*
> *destDoc = '../exemple/testBtn_new.xlsm';*
> *wb = load_workbook(oriDoc, read_only=False, keep_vba=True)*
> *wb.save(destDoc)*
>
> The result in attachment "activeXToPicture.png".
>
> Is it possible to preserve ActiveX control with openpyxl ?

I suspect that some DrawingML components are being lost. The code in
openpyxl that preserves the VBA object currently only preserves VML. I
have no idea at the moment when the read support for DrawingML will be
complete.

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226

Jean-Christophe Dewalque

unread,
Oct 26, 2017, 5:55:33 AM10/26/17
to openpyx...@googlegroups.com
Thank you for your response.

I tried to use "Form Controls" instead "ActiveX Control".
The component "Option button" is preserved in this case.

Now, I would like to set value of component "Option Button" (Select yes or no button)

I don't find in documentation how can I do it.


 



--
You received this message because you are subscribed to a topic in the Google Groups "openpyxl-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpyxl-users/VCVtuTHWGyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpyxl-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages