I just know this has a simple answer but I haven't been able to track it down. I am importing data from an ascii file like the following:"Channel Name","Date","Time","Value"
"TONS ","2/22/00","11:40:00", 37.12
"TONS ","2/22/00","11:41:00", 37.06
"TONS ","2/22/00","11:42:00", 33.94
When imported, I have 4 columns. The problem is that there are quotes around the data in the first three columns, so it is not a recognized date or time format. Is there an easy way to just remove all the quotes from the data? What script would work? I am using Origin 6.0. I tried to piece together a script (see below for the ugly mess), but am having no luck getting it to work. So, if it is a script solution, any hints on how to get data to and from a worksheet (whenever I try to set the value of a cell it ends up as -) and how to parse for the quote character, will looking for """ work?
Thank you for any assistance,
John Weale
/*
Will parse the selected range of cells to remove unwanted " characters
DOESN'T WORK -- all cells end up as -
*/
loop(jj,selc1,selc2) {
loop(ii,selr1,selr2) {
%O=col($(jj))[$(ii)];
loop(kk,1,%[%O]) {
if(%[%O,kk:kk]==""") %Z=%Z
else %Z=%Z%[%O,kk:kk];
}
col($(jj))[$(ii)]=%O;
};
};