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
 import ASCII to wks without column names
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

blt2si

Germany
37 Posts

Posted - 08/06/2003 :  08:01:27 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hey all,
Does anyone know how to import a whole ascii file into a worksheet (either a new one or a template) using labtalk script, without any of the lines being put into the column name or label? I've tried and always seem to only get the last line put into the cells, with the rest put in the column name and label. (The ascii file is separated by semi colons if that helps.)
Any help would be appreciated! Thanks!

Mike Buess

USA
3037 Posts

Posted - 08/06/2003 :  10:00:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Have you tried changing the ASCII Options of your wks template? (I don't think you can set them from LabTalk.)

File Header section...
Specify number of lines to skip in header.
Specify known subheader lines = 0.
Maximum # lines to store in column labels = 0 //that may be unnecessary

Other Options...
Deselect these options
Rename columns if 1st line contains labels.
Create column labels from Header.

Mike Buess
Origin WebRing Member
Go to Top of Page

blt2si

Germany
37 Posts

Posted - 08/07/2003 :  04:18:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks! I forgot about the template settings!!
Go to Top of Page

greg

USA
1380 Posts

Posted - 09/04/2003 :  4:44:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
New in 7.0 is the ability to access Worksheet Template settings for import via LabTalk. This is done with the ascimport object.

With a Worksheet active, use:

ascimport.GetSettings()

to read the current properties. Then you can edit those properties:

ascimport.Partial.C1
ascimport.Partial.C2
ascimport.Partial.R1
ascimport.Partial.R2
ascimport.Delimited
ascimport.Delimiter
ascimport.Character$
ascimport.Width$
ascimport.HeaderLines
ascimport.SubHeaderLines
ascimport.AutoSubHeaderLines
ascimport.Mode
ascimport.NumColumns
ascimport.Partial
ascimport.RenameWks
ascimport.ApplyRange
ascimport.RenameCols
ascimport.Labels
ascimport.MaxLabels
ascimport.LeadingZeroes
ascimport.NonNumeric
ascimport.FileName$
ascimport.AutoColTypes
ascimport.TestLines

and save them:

ascimport.WriteSettings()

then import (assuming you assigned a filename with path):

ascimport.import()


Go to Top of Page

tib

Switzerland
105 Posts

Posted - 10/22/2003 :  11:28:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, Greg for this hint.
How do you know this since this ascimport object is not in the Origin LabTalk Help V7SR4?
(also a question to the Origin staff)

Maybe you also have an answer to my question
http://www.originlab.com/forum/topic.asp?TOPIC_ID=2622
about the layer.cmap... object and properties?
Maybe an Origin C solution?
Thanks, Tilman.

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