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
 Inserting columns and rows and set recalculation

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
JasonLLL Posted - 04/26/2022 : 12:42:56 PM
Hi

How can I insert new columns and rows via embedded Python?

And can I set the recalculation mode via Python?

Regards
JL


Origin Ver: 2021
Operating System: Windows 10 enterprise
1   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 04/27/2022 : 02:21:22 AM
Hi,

I think currently there is no Python function for the operations you need.

So you may have to run Labtalk script like

import originpro as op
wks=op.find_sheet()

#insert a col between A & B, the name "junk" does not matter
wks.lt_exec(r'worksheet -i 1 junk;')

#Insert 5 rows in front of the 3rd row
wks.lt_exec(r'wks.insertrows(3, 5);')

# suppose there is an lock with UID 831, set recalculate mode to be Manual
wks.lt_exec(r'run -au 2 831;')

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