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

Add OLE shapes #981

Open
R3c4rdo opened this issue May 29, 2024 · 0 comments
Open

Add OLE shapes #981

R3c4rdo opened this issue May 29, 2024 · 0 comments

Comments

@R3c4rdo
Copy link

R3c4rdo commented May 29, 2024

Hello,

I am trying to add different OLE objects into a pptx and I noticed that for example if i use the "standard" way of adding a new xlsx for example:

slide.shapes.add_ole_object(
object_file='../Test.xlsx',
prog_id=PROG_ID.XLSX,
left=self.left,
top=self.top
)

This works flawlessly. But if I try to use the prog_id as a string for example:

slide.shapes.add_ole_object(
object_file='../Test.xlsx',
prog_id="Excel.Sheet.12",
left=self.left,
top=self.top,
)

an empty excel file object is embedded into the pptx. Is there a way to overcome this? I was trying to use different file objects like pdf files and the behavior seems to be the same as the second example where an empty pdf file is embedded. I have tried modified the _ProgIdEnum class with a new lazyproperty for PDF but that just gives me an error.

Could you help me?

Thanks alot!

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