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
 Import an ASCII file resulting in a shortened name
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

PhO68

8 Posts

Posted - 11/13/2012 :  06:03:29 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin 7.0 SR0 (behaviour also observed on 7.5 SR0)
Operating System: Windows XP

Hi,
Recently I have observed a very strange behaviour with the opening of some ascii files. If I take for instance an ascii file named "scan_013.txt" I would expect when open with Origin a worksheet name scan013 (this is what I usually observe). Nevertheless, recently on files with new column structure but with similar names the worksheet name is shortened to scan01 (limited to 6 characters) (which is a pain when importing several files at the same time) (the datas are nevertheless corrected imported). So here I am with this strange behaviour: I could understand that a different column structure can modify the importation (which is actually not the case here) but why would the worksheet name be modified (shortened)!!! So if someone here could give some solution I would greatly appreciate... I have been testing several things for several days without any clear solution (the worst is that this behaviour sometimes disappear without me doing anything special).
In advance thank you very much for any hint or solution...
Philippe

Hideo Fujii

USA
1582 Posts

Posted - 11/13/2012 :  11:00:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Philippe,

In Origin 7.x or older, there was no concepts of "short name" and "long name" as usable in 8.x or later. In such old versions, the worksheet name corresponds to essentially the short name in the later versions.
The short name is used as a variable in the script, and it should follow the syntax, having the limitation of the use of certain special characters like "_".

In the "modern" versions, if you import the data, the file name is obtained in the long name as well as the header information or parameters.
If you want to confirm and experience this new behavior, you can try the evaluation version of Origin: http://www.originlab.com/index.aspx?go=Downloads/OriginEvaluation

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 11/13/2012 11:12:14 AM
Go to Top of Page

PhO68

8 Posts

Posted - 11/13/2012 :  11:19:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
Okay but the think I don't understand is that in a short sequence like:
getfilename *.txt;
win -t data;
open -w %a;
When I look to %a I have something like %a = scan_013.txt (taking my old example), but why when origin imports the file with open -w %a do I get a worksheet name like scan01 and not scan013 ?? And once more it was working nicely for a long time and I don't understand what in the structure of the file can generate this error...
Philippe
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 11/13/2012 :  11:40:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Philippe,

Probably it is an old bug. When I tried to import the ascii file, scan_013.txt using Origin 9, the worksheet short name correctly became scan013 with the long name scan_013.txt (also it became the sheet name in the workbook).

--Hideo Fujii
OriginLab
Go to Top of Page

PhO68

8 Posts

Posted - 11/13/2012 :  12:01:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
Actually the problem is not coming from the _ character: I have just tested to rename my file scan_013.txt to scan013.txt and I got the same problem: the worksheet name for Origin is still scan01 and not scan013. I am still convinced that something in the file (and not the name) is causing that (as I wrote I have been working for month with files with the structure name scan_###.txt without any problem) since last week we have modified the structure of the columns of the files generated by our acquisition system...
Thanks for the help,
Philippe
Go to Top of Page

greg

USA
1378 Posts

Posted - 11/13/2012 :  3:55:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
FYI
Dataset names (the formal name by which you programmatically refer to a dataset) are restricted to 24 characters. Subtracting the underscore, you get 23 characters for book name + column name. If one of your columns has a 17 character name then you will be able to get no more than 6 characters for a book name. As I recall, in some versions under some circumstances you might even get one less character.

Maybe this is what you are seeing?
Go to Top of Page

PhO68

8 Posts

Posted - 11/14/2012 :  09:26:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Okay thanks a lot indeed the problem was coming from the use of very long column name. Now it is working nicely!
Once more thanks lot.
Philippe
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