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
 All Forums
 Origin Forum
 Origin Forum
 Import an ASCII file resulting in a shortened name

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PhO68 Posted - 11/13/2012 : 06:03:29 AM
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
6   L A T E S T    R E P L I E S    (Newest First)
PhO68 Posted - 11/14/2012 : 09:26:09 AM
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
greg Posted - 11/13/2012 : 3:55:33 PM
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?
PhO68 Posted - 11/13/2012 : 12:01:24 PM
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
Hideo Fujii Posted - 11/13/2012 : 11:40:21 AM
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
PhO68 Posted - 11/13/2012 : 11:19:18 AM
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
Hideo Fujii Posted - 11/13/2012 : 11:00:10 AM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000