nk.S
Republic of Korea
5 Posts |
Posted - 07/08/2024 : 5:59:58 PM
|
Origin Ver. and Service Release (Select Help-->About Origin): origin 2023 Operating System: window10
hi!! please, i need your help!!~~
I'm trying to automate updating ole objects inserted in powerpoint using python. To roughly explain the process, 1. Open the origin OLE object (1 graph, 1 worksheet, name unknown) inserted into PowerPoint using a win32 module 2. insert the data preprocessed in Python into the worksheet of the ole object. 3. I don't want to change the current graph settings (no rescale), update only the changed data to the graph, save it, and close it.
code is as below, but it's not working, is there a good solution?
--Omit previous code
# Object name in ppt shape.name = test
# Object execution ole_object = shape.name.OLEFormat.DoVerb()
# Find the worksheet for the executed object sheet = op.find_sheet()
# Activate worksheet sheet.activate()
# insert data sheet.from_df(data)
# ole_object.Save() op.utils.exit()
# presentation save and quit presentation.save() presentation.close()
sng |
|