The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Python
 how to udate OLE object in powerpoit

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000