mfi = Multiple File Import(
<<Import Data();
mfi holds the Multiple File Import object.
dtlist holds the list of files produced by sending the Import Data message to the MFI object. The MFI object is gone because it was not stored in a variable or window. You can keep the MFI object by sending Create Window to it or storing the object in a variable, such as mfi, and by sending messages such as Import Data to that variable.
Create Window can be useful for debugging. The window is visible and the MFI object is available. Run the following lines one at a time to see it:
The Import Data message always returns a list: an empty list for no files, a list of one data table for one file, a list of N data tables for many files. Here’s an example of using dtlist to get the first data table from the list and then formatting the third column with the thousands separator:
dtlist = Multiple File Import(
<<Import Data();
dt << Save( "$DESKTOP/example.jmp" );
•
|
See Import Images from a Directory for details about using MFI to import images from a web page into a data table.
|