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
 Insert string to a row in a Worksheet
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

materialscientist

Germany
2 Posts

Posted - 09/29/2020 :  08:36:02 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: Windows 10

Hello

I am trying to add Data to a new workbook in a specific Row. That is working fine with integer and double variables. It is not working for string variables. Here the output is always --. How can i fix this.
example code:
string name$
name$=page.name$;
range rr1=[Data]1!col(1)[index];
rr1=name$;
Output in cell is: --



一击爆裂陈子豪

Taiwan
41 Posts

Posted - 09/29/2020 :  09:09:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In general, you should not directly assign single value to a range, although it works in some cases. Please do:

string name$ = page.name$;
range rr = [Data]1!1;
rr[index]$ = name$;
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