The easiest solution to this old problem is to import as text and remove the "" later. I assume you know how to do the first part with the Import Wizard. The second part can also be accomplished with the Wizard as follows...
On the Wizard's Save Filters page check the Save Filter option and specify the location. Then check "Specify advanced filter options" at the bottom and click Next. Enter the following script in the LabTalk code section...
get col(1) -e nrows;
loop (i,1,nrows) {
loop (j,1,wks.ncols) {
%A=cell(i,j)$;
cell(i,j)$=%A;
};
};
This method is not particularly fast since it strips the "" one cell at a time. But it's much better than going through Excel.
...The following Origin C method is much faster.void remove_all_quotes()
{
Worksheet wks = Project.ActiveLayer();
Dataset dd;
StringArray sa;
string str;
foreach (Column cc in wks.Columns)
{
dd.Attach(cc);
dd.GetStringArray(sa);
str.SetTokens(sa,'|');
str.Remove('"');
str.GetTokens(sa,'|');
dd.PutStringArray(sa);
}
}
After you've compiled the function just replace the LabTalk script at the top of this message with the single command
remove_all_quotes;
Note that all columns must be text+numeric in order for this to work.
Mike Buess
Origin WebRing Member
Edited by - Mike Buess on 01/25/2005 4:58:08 PM