T O P I C R E V I E W |
nk.S |
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 |
1 L A T E S T R E P L I E S (Newest First) |
YimingChen |
Posted - 07/29/2024 : 11:46:08 AM Can you update the OLE object in PPT by deleting the old one, and paste a new graph object with updated data?
James |
|
|