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
 Reapplying template
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Laura79

UK
Posts

Posted - 10/31/2006 :  06:52:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
I've updated a worksheet template and i want to reapply this template to a number of worksheets in a project. Is this possible and if so how do i go about doing this?

Thanks!

Mike Buess

USA
3037 Posts

Posted - 10/31/2006 :  10:32:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If it's just a matter of copying data from old worksheet to new then the following LT script will work. If it's more complicated then I need details.

%Z="";
doc -e W {%Z=%Z %H}; // list worksheets to %Z
for(i=1;i>0;i++) {
%W=%[%Z,#i]; // get name of ith wks
if(%W=="") break;
win -a %W; // activate wks
wo -s 0 0 0 0; // select all
menu -e 57634; // copy
win -t D TemplateName; // create wks from new template
wo -s 0 0 0 0; // select all
menu -e 57637; // paste
wo -s -1 0 -1 0; // deselect all
win -cd %W; // close original wks
win -r %H %W; // rename new wks
}

Mike Buess
Origin WebRing Member
Go to Top of Page

Laurie

USA
404 Posts

Posted - 10/31/2006 :  10:35:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
Currently, there may not be a way to do this. There is a page -t LabTalk command that can be used to replace the page with a new template, but this also deletes the data in the process, so you'd also need to copy the data back.

Please explain in a bit more detail what you've updated in the template and want to then apply to your other worksheets. Maybe someone has a short script that can be run instead of using a template.

Thanks,
Laurie

OriginLab Technical Support
Go to Top of Page

Laura79

UK
Posts

Posted - 10/31/2006 :  10:49:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the replies. The only things i changed in the old worksheet template was to add a few extra columns and also set column values for these new columns.

It probably wouldn't such an issue to use that -t LabTalk commond to replace the page with the new template as i have the raw data in an excel file so it's just a matter of copy or paste. I was just curious to find out if there was a way of updating without deleting the data.
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