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 for Programming
 LabTalk Forum
 Creating a String Dataset
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Drbobshepherd

USA
Posts

Posted - 11/29/2012 :  4:11:35 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.6
Operating System:XP

I am looking for a quick way to set the value of every cell in a column to the same string. Looping is too slow. Any ideas?

DrBob Shepherd

P.S. If you are wondering why I would want to do this, it is because I want to label every row with the sheet name so when I copy a row into another workbook, I know which sheet it came from.

JacquelineHe

287 Posts

Posted - 11/30/2012 :  02:12:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

Hi,

Please refer to this example to fill string "aa" in Book1 sheet1 Column2:


str$="aa";
csetvalue col:=[Book1]Sheet1!col(b) formula:="str$";


OriginLab
Jacqueline
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 11/30/2012 :  11:19:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Jacqueline,

Thanks for our quick response. It worked perfectly and is much faster than a loop.

DrBobShepherd
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