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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Find & Replace in all worksheets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

rezashah

1 Posts

Posted - 06/22/2009 :  05:34:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0
Operating System: XP

Hi,

I have a project with many worksheets, which I have imported. Now I recognize that some data points are 0 and I would like to remove them.
So I tried the find/replace function - important seraching for whole word = 0.

Since I have many worksheets I would like to know how I can make this find/replace for all of them at once - and not one by one like now.


Thanks in advance.

Reza

easwar

USA
1964 Posts

Posted - 06/23/2009 :  12:01:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Reza,

You could change zeroes to missing values (is that what you mean by remove?) in all book/sheets using script such as below.

Copy and paste all lines to script window, then highlight all lines and press Enter to execute.

The wreplace X-Function used in this script is same as the dialog that opens from the Worksheet: Replace menu

Easwar
OriginLab


// Loop over all workbooks
doc -e W {
   type Processing book: %(page.name$);
   // Loop over all sheets in current book
   doc -e LW {
   type "  Processing sheet: %(layer.name$)";
   // Replace 0 with missing values in current sheet using wreplace X-Function
   wreplace rng:=!(1:end) type:=num find_value:=0 cond_value:=eq replace_value:=0/0;
   }
}
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000