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
 Missing CSV data?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AMHumphries

UK
Posts

Posted - 09/20/2006 :  09:12:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): Pro 7.5 SR4
Operating System: Windows XP

I am opening a .csv file in Origin that consists of 10 columns of data, the first 9 are numeric and the 10th is an alphanumeric string in the format "11239834234_06_JUL_2006_10_20_39". When I open the .csv file in Microsoft Excel, the string is present. However, when I open the .csv file in Origin the 10th column is empty.

Has anyone encountered this problem before? And if so can it be fixed?

Mike Buess

USA
3037 Posts

Posted - 09/20/2006 :  09:28:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
How are you importing? (Wizard, Import ASCII or script)

Mike Buess
Origin WebRing Member
Go to Top of Page

AMHumphries

UK
Posts

Posted - 09/20/2006 :  10:03:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
A script using the following code:


// Open files and place them in new, seperate worksheets
fdlog.path$ = "C:\MATLAB71\PIMS\"; // set fdlog's default path
fdlog.ShowComment = 0;
fdlog.UseGroup(Ascii);
if (fdlog.MultiOpen() != 0/0);
{
loop (ii, 1, fdlog.MultiOpen.Count)
{
window -t data MULTI;
fdlog.Get(A, ii);
open -w %A;
%B = %H;
window -r %B Sheet$(ii);
}
}

// Merge all worksheets into one dataset
fileCount = fdlog.MultiOpen.Count;
if (fileCount == 0)
{
type -b "Error: No files have been selected for loading.";
return; // exit the script
}
else if (fileCount > 10)
{
type -b "Error: Too many files selected. Maximum number is 10.";
return; // exit the script
}
else
{
// copy col D from sheet represented by count to the column
// represented by count in multiWks
window -t data MULTI;
%B = %H;
window -r %B multiWks;
loop (jj, 1, fileCount)
{
%(multiWks,jj) = Sheet$(jj)_D;
%J = Sheet$(jj)_J;
%K = "\L($(jj)) %J";
}
}


Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 09/20/2006 :  5:46:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Apparently you are importing to a custom template called MULTI. Are it's ASCII options set to import 10 columns?

Mike Buess
Origin WebRing Member
Go to Top of Page

AMHumphries

UK
Posts

Posted - 09/21/2006 :  05:26:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, the ASCII options on the template are set to import 10 columns. I can't understand for the life of me why it is importing 9 columns of data, and then not including the 10th column (even though it is only one cell of data).

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 09/21/2006 :  08:25:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I can't reproduce that with 4-column csv files. Please post the first 5 or 6 lines of your 10-column file including header, if any.

Mike Buess
Origin WebRing Member
Go to Top of Page

AMHumphries

UK
Posts

Posted - 09/21/2006 :  08:58:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for all your help Mike, a colleague provided me with a template that works so it's sorted now.

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