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
 Get column letter from column number
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

parcomilati

6 Posts

Posted - 08/17/2024 :  11:00:43 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi everyone,
I'm asking for help since I can't find a solution online.
Here I want to apply a formula to the column to have the auto-calculation of the values. The problem is that if I do it with the column number when new columns are inserted in between the calculation, it will not point to the right column anymore, whereas if you use the column letter, the letter in the formula row will be updated.
Here is a snippet of my code:

int a = 144;
int b = wks.ncols;

loop(ii, 1, 16){
	wcol(b+ii)[L]$ = "Voltage Variation";
	wcol(b+ii)[U]$ = wcol(a+ii)[U]$;
	wcol(b+ii)[C]$ = wcol(a+ii)[C]$;
	wcol(b+ii)[O]$ = "col($(a+ii))-col($(a+ii))[1]";


Does anyone know of a method to translate the column number to the column letter?

I really appreciate any help you can provide.

Marco

aplotnikov

Germany
160 Posts

Posted - 08/19/2024 :  04:09:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
https://www.originlab.com/doc/LabTalk/guide/string-substitution#Column_Label_Row_Information
Go to Top of Page

parcomilati

6 Posts

Posted - 08/19/2024 :  10:07:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by aplotnikov

https://www.originlab.com/doc/LabTalk/guide/string-substitution#Column_Label_Row_Information



Thank you so much, I missed it :)

Have a nice day
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