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
 Origin Forum
 Worksheet query (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
MatthiasW Posted - 04/10/2018 : 11:59:30 AM
Hello,
I wanted to ask if it's possible to recalculate the extracted data (worksheet query) if it's changed.
I'm not able to apply if I turn the "Recalculate" dropdown on manuel or auto.

Thanks in advance
Matthias
3   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 04/13/2018 : 4:52:38 PM
Hi Matthias,

> I would like to have the recalculated data in the same worksheet as before.

To output the extracted data in the new sheet in the same workbook, you can set the output destination by "iy:=" option like:
wextract iy:=[Book1]1!col(A) settings.stAlias.Cols:=1 settings.stAlias.AliasNames:=A settings.stCondition.Condition:="A<0.5" settings.cols:="0|1" oy:=<new>!<new>;

To add the extracted columns in the source worksheet, you can put a script like:
wextract iy:=[Book1]1!col(A) settings.stAlias.Cols:=1 settings.stAlias.AliasNames:=A settings.stCondition.Condition:="A<0.5" settings.cols:="0|1" oy:=<new>!<new>;
sheetno=page.active;  //Sheet number
copydata irng:=1!1:2 orng:=[Book1]Sheet1!<new>;  //Copy data to original sheet
page.active=sheetno;  //Go back to the extracted sheet
layer -d;  //Remove extracted sheet
Hope this helps.

--Hideo Fujii
OriginLab
MatthiasW Posted - 04/12/2018 : 08:22:14 AM
Thanks for your answer!
This is working out well in my case.
But I have another problem, doing it with that way.
If I change the data right now, it's producing new windows for the extracted data and I would like to have the recalculated data in the same worksheet as before. Is this possible?

Thanks in advance
Matthias
Hideo Fujii Posted - 04/10/2018 : 2:51:10 PM
Hi Matthias,

Worksheet Query doesn't provide the recalculation mechanism, but you can try the following work-around.

Make a dummy column which "watches" the value change of a column, and triggers wextract x-function command.
(See: https://www.originlab.com/doc/X-Function/ref/wextract)
See the sample screenshot below:



Here, column C is the dummy for triggering, and it has the Set Column Values settings - no actual
calculation body, but the "Before Formula Scripts" which has the wextract command:

wextract iy:=[Book1]1!col(A) settings.stAlias.Cols:=1 settings.stAlias.AliasNames:=A settings.stCondition.Condition:="A<0.5" settings.cols:="0|1";
Book2 and Book3 are the extracted results before and after the change in column A.

Hope this helps.

--Hideo Fujii
OriginLab

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