Author |
Topic |
|
DataConv
Germany
60 Posts |
Posted - 08/28/2011 : 08:12:55 AM
|
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.1G SR2 Operating System: W7x64 SP1
This might be a silly question: But what is the size limitation of a cell in a worksheet with respect to string content? Background: For a proprietary file format i need to read the file line by line as strings. The processing is doneafter import by a LabTalk script, OriginC is currently no option - don't ask why... When the import file is manually configured to read a maximum of 200 chars per column the import works. When the filter is saved, and the import is redone with the saved parameters, the import is incomplete / truncated. I haven't checked so far to what number... However, ich the maximum chars per column is set to 100, everyhing works fine! Confused... |
|
Hideo Fujii
USA
1582 Posts |
Posted - 08/29/2011 : 5:12:14 PM
|
Hi DataConv,
I have tried, but couldn't reproduce the problem. Did you do such that? : 1) You pre-defined the import filter by going thru the Import Wizard with parameters in Data Columns page: Fixed Width=200, N of Columns=1. 2) Did you re-import the file by a LabTalk command like? : impFile fname:="D:\mydata.dat" filtername:="myFilter.oif"
In the step 2), I saw no column width reported in the Script window. How did you observe the reduction of the width to 100 from 200? When I performed in Import Wizard with the filter, the column width correctly appeared as 200.
Maybe you can write the step-by-step procedure how to reproduce the problem in this thread, or you can send your filter file and the sample data file to me (tech@originlab.com with ATTN:Hideo).
--Hideo Fujii OriginLab |
|
|
DataConv
Germany
60 Posts |
Posted - 08/30/2011 : 02:01:39 AM
|
The problem seems to be quite complex... So far: I defined an import filter writing all lines of a txt files in a single column with a fixed width of 200 (lines vary, but never exceed the 200 chars). At the end, a script processing the lines is executed. The filter is stored always in the project folder, the script is included in the project file (i know, not the best way. But the easiest way to distribute...) When i bring the .oif file to another computer and execute it using the manual import ascii button the first time, mostly (not every time!) the import fails, because the lines are truncated. To be correctly: the import does something - the script reports an error because of the lines are truncated! Even a retry of the import fails. The user has to import the file with the wizard, go through all the options, and in the tab with the column width s/he has to alter the value (or reenter it) and push 'apply' on the button aside. Then store the filter again. After that, everything runs without problems. Sometimes, for not reproducible circumstances, the failure appears even afterwards. My guess is, that the column width (as a property of the worksheet column) is not set prior the actual import (when the worksheet is prepared for import)? I cannot prove that... |
|
|
|
Topic |
|
|
|