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

JonasKlim

Lithuania
36 Posts

Posted - 11/22/2017 :  04:58:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I want to copy read numbers from text sting and write them into a cell. The numbers read are like "050", "150", etc. I need data in numeric format, like 50, 150 (omitting first 0).
I try to format column for data with command wks.col(E).format= 1;
Still, the numbers are written like text 050, 150, ...
If I make manual formatting (Properties -> Format), the format is "Text & Numeric". After changing to "numeric" I get correct format 50, 150.
How to make the same with script?

Best regards,
Jonas

Echo_Chu

China
Posts

Posted - 11/22/2017 :  05:10:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Jonas

Please use

wks.col5.format=1;


to set the column format, instead of wks.col(E).format= 1

Echo
OriginLab Technical Support
Go to Top of Page

JonasKlim

Lithuania
36 Posts

Posted - 11/22/2017 :  05:35:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Echo,

Thank you, it works.

Regards,
Jonas
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