From-Import-Wizard
Run Script from Import Wizardscript, import wizard/filterThe Import Wizard can be used to import ASCII, Binary or custom file formats (when using a custom program written in Origin C). The Wizard can save a filter in select locations and can include script that runs after the import occurs. Once created, the filter can be used to import data and automatically execute script. This same functionality applies when you drag a file from Explorer and drop onto Origin if Filter Manager has support for the file type.
For example,
range raTime = 1; // Get the Time column as a range range raAmp = 2; // Get the Amp column as a range range raBase = 3; // Get the Base column as a range page.xlcolname = 0; // Turn off Spreadsheet Cell Notation firstly wks.addcol(Subtracted); // Create a column called Subtracted range raSubtracted = 4; // Get the Subtracted column as a range raSubtracted = raAmp - raBase; // Subtract Base from Amp pkFind iy:=(1,4); // Find peaks in the Subtracted data range raPeaks = 5; // Get the peak index column as a range for( idx = 1; idx <= raPeaks.GetSize() ; idx++ ) { pkidx = raPeaks[idx]; ty Peak found at $(raTime[pkidx]) with height of $(raSubtracted[pkidx]); }
For the Spreadsheet Cell Notation in the workbook, please see FAQ-849 for more information.
This is what happens: