Data Import Wizard |
The Data Import Wizard is more flexible and accepts more file types than the File Input Component, although it requires you to fill in more information to import a file to precise specifications. The Data Import Wizard also allows you to interactively preview your data, so that any changed import settings are automatically reflected in the Wizard.
To insert the component:
The output of this component can be manipulated like any other Mathcad array. The Wizard establishes an updatable connection to a data file: if you recalculate the region, the file is imported again. If you only wish to import data once, use a Data Table.
There are a number of tabs available on the Wizard. The available choices depend on the type of file you are importing.
![]() |
File Format Dialog |
The first dialog in the Data Wizard sequence allows you to select the location and format of your file, determining the choices available on subsequent panes, and the way the component displays in the worksheet. The following options are available:
Allows you to select the type of file you wish to read. Available options are Delimited Text, Fixed-Width text, Microsoft Excel, MATLAB, Binary, Mathcad PRN, and several other database options.
Allows you specify the name and path to your file, either by typing it in the entry box or by using the Browse button. There is also a check box for selecting relative or absolute path.
By default, data files imported using the Data Wizard display as data tables, showing their contents. Checking this box displays only the file name and associated path.
![]() |
Delimited Text Options |
The Delimited Text Options tab is only available when importing data from a delimited text file. Only the first 100 rows are displayed in the preview, for speed. This tab contains the following options:
Allows you to specify the type of delimiters to recognize when reading the file. Choices are: Auto, tab, space, comma, and other, allowing you to enter any text value(s).
Allows you to select the first row from which you wish to read the data.
Allows you to select how you would like to treat blank rows: by skipping them, by reading them as blanks in the data, or by stopping the data import.
Allows you to select a number of rows to omit from the end of the file.
![]() |
Fixed-Width Text Options |
The Fixed-Width Text Options tab is only available when importing data from a file with fixed-width columns. Only the first 100 rows are displayed in the preview, for speed. This tab contains the following options:
Allows you to specify the number of characters in each column of fixed-width data. Column widths should be separated by a comma, and there should be an equal number of widths and columns in your file.
Allows you to select the first row from which you wish to read the data.
Allows you to select how you would like to treat blank rows: by skipping them, by reading them as blanks in the data, or by stopping the data import.
![]() |
Text Options tab |
The Text Options tab controls how the Data Import Wizard processes text files imported into Mathcad, and contains the following options:
Allows you to specify a qualifying character to override the Wizard's auto-sensing to determine which entities are read as text.
In files which contain thousands separators, allows you to choose between comma, dot, and space to correctly interpret the represented numbers.
Allows you to choose between comma and dot as a decimal symbol, to correctly interpret the represented numbers.
Tells Mathcad the substitution to make when it encounters missing data. Since Mathcad cannot calculate arrays containing an empty placeholder, you must make sure all placeholders are filled. You can choose to fill empty cells with NaN, 0, -1, or an empty (null) string, or enter a different value.
![]() |
Binary Options tab |
The Binary Options tab is only available when you use the control to import a binary format file. Only the first 100 rows are displayed in the preview, for speed. This tab contains the following options:
Select one of the following options: unsigned 8-bit integer (byte), 64-bit floating point (double), 32-bit floating point (float), 16-bit integer (int16), 32-bit integer (int32), unsigned 16-bit integer (uint16), or unsigned 32-bit integer (uint32).
Choose whether data is interpreted as little-endian (low byte first) or big-endian (high byte first). It has no effect if you select byte as the data type.
Set the number of columns per row in which to format the data; the minimum acceptable value is 1. Incomplete rows are ignored.
Number of bytes to skip before reading.
![]() |
Excel Options tab |
The Excel Options tab is only available when importing data from an Excel file. Only the first 100 rows are displayed in the preview, for speed. This tab contains the following options:
Allows you to select a block of data by specifying the named range associated with it. The Wizard can access any named range in the workbook.
Sets how the control handles empty rows in the data set. You can choose to skip them, read them, or stop at the first one reached.
Allows you to select the specific page in the workbook from which to import data. If no worksheet or named range is selected, the control reads data from the first page of the workbook.
Tells Mathcad the substitution to make when reading in an empty cell. Since Mathcad cannot calculate arrays containing an empty placeholder, you must make sure all placeholders are filled. You can choose to fill empty cells with NaN, 0, -1, or an empty (null) string, or enter a different value.
Allows you to specify the particular range of cells to read in; by default, the Wizard reads in all data on the default worksheet. You can specify the particular cells to read by using the Excel syntax
You can also use the data preview to specify the range by shift- or control-clicking the specific rows or columns you wish to import. You can select all the cells by clicking the empty box in the upper left corner of the data preview.
![]() |
Data Range tab |
The Data Range tab allows you to specify the rows and columns to import. It is the last tab in the Wizard, and applies to all file types. You can either do this visually, by selecting the row and column headings in the preview, or in the available text boxes, if you want to specify rows and columns by number. For example, you could Ctrl-click to select discontiguous rows, or you could type 1-3,5,7-9 in the Read Rows text box.
The preview on this tab is limited to the first 250,000 data points, for the sake of speed.
You cannot create a Data Wizard Component in an existing expression; you must begin from a blank region of the worksheet.
Pathnames are relative to the current working directory.
You can change the data file name by right-clicking on the component and choosing Properties, or by right-clicking and choosing Add Input Variable. This brings up a placeholder below the component which can be filled with a path and filename in quotes, or a string variable name. This is another way to display the file name along with the data. The Properties menu can also be used to change the display settings for the Data Table.
Many of these fine-grained import options are also available in the READFILE function, allowing you to use these capabilities at the command line for program loops. To read and write binary files, use READBIN and WRITEBIN. To write delimited text files that store nested matrices, use WRITEPRN.
To acquire data continuously from acquisition hardware, use the Data Acquisition component.
It's also possible to read records from an ODBC database, using a different component, or to open Excel files directly in Mathcad, using the Excel component.