The Excel Loader can read numeric data from .xls files for Microsoft® Excel® version 5.0 or higher.
|
The Excel Loader is intended primarily for users who record experimental or simulation data using Excel. Your Excel file must contain only values (no equations). We recommend the use of the Excel add-on from the Util/Excel folder as an easier method to open Excel data with Tecplot 360 EX (see Section B - 1 “Excel Add-In”). Use the Text Spreadsheet loader for delimited files (Section 4 - 26 “Text Spreadsheet Loader”).
If your spreadsheet is arranged as Table Format or Carpet Format, the Excel Loader is a point-and-click operation. Once you have selected an Excel file to load, the Excel Loader leads you through a series of dialogs, prompting you to specify a variety of attributes, including the data format in the Excel spreadsheet, the variables to be read, and zone information.
|
4 - 9.1 Spreadsheet Data Formats
The Excel Loader will automatically identify blocks of data in Table Format or Carpet Format. The loader will list blocks of data in standard notation for Microsoft Excel. For example, a block found on worksheet sheet1, cells A1-D8, is listed as follows: (sheet1! A1:D8).
If you select a user-defined format (or if the loader did not identify any carpet or table blocks), you will be prompted to enter the names and number of variables, and one or more zones and associated properties. You will also need to enter the location of the field data in the spreadsheet for each zone.
Use Table format for data that will be plotted in line plots (i.e. data with an independent and one or more dependent variables). Many spreadsheets containing data to be plotted in 2D or 3D Cartesian plots will also satisfy the conditions of table format.
A table formatted dataset has the following characteristics:
• The dataset is arranged in one or more adjacent columns.
• Each column is the same length.
• Each cell contains numeric data.
• The first row is a header row containing the variable name for its corresponding column.
• The spreadsheet dataset is imported as a single I-ordered zone in POINT format with N variables, where N is the number of columns in the table.
The block of data can contain no empty cells. An empty cell will prevent the loader from recognizing the block. You can satisfy this condition by filling blank cells with 0.0. |
Figure 4-1 shows a block of data in table format in Excel.
Figure 4-1. A block of data in table format.
Use carpet format for spreadsheet data to be plotted in a 2D or 3D Cartesian plot. The carpet formatted dataset, shown in Figure 4-2, has the following characteristics:
• The spreadsheet dataset is imported as an IJ-ordered zone. See Chapter 6: “XY and Polar Line Plots”.
In Figure 4-2, the spreadsheet is imported as I=4 and J=4. The three variables are X, Y, and V. In the spreadsheet cell 2B is index 1, 1, cell 3B is index 2, 1.
• The top row in the block contains the values of the X-variable, the first column of the block contains the values of the Y-variable, and the V-values are the interior data. This format is useful if your dataset was generated from a function f, such that f(X, Y) = V.
• The block is a rectangular arrangement of numeric data in the spreadsheet, with a blank cell in the upper left hand corner.
• There must be no blank cells within the block of data. An empty cell will prevent the loader from recognizing the block. You can satisfy this condition by filling blank cells with 0.0.
• The block of data must be surrounded by empty cells, text-filled cells, or table boundaries. The loader will not recognize a block of data as being in carpet format if any cell adjacent to the block is filled with a number.
Figure 4-2. This carpet table shows values as a simple arithmetic function of X and Y.
The Other format option gives you a great deal of flexibility in loading data into Tecplot 360 EX. A series of dialogs leads you through the process of describing your data, similar to the way you would specify this information in a Tecplot-format ASCII file.
• Default format - The Excel Loader offers a semiautomatic option that requires only that you specify the upper left and lower right corners of your data block. Once you've specified those corners, it handles the data in the same way that Tecplot 360 EX handles an unformatted block in an ASCII file. It assumes one zone of I-ordered data in POINT format.
• Custom format - Using the Custom format option, you can specify characteristics of your dataset. Custom format has the following features:
• It allows you to work with spreadsheets containing blank cells or text cells.
• For XY, IJ, and IJK-ordered data, specify the boundaries of the block to load, and how many data points there are within that block (IMax, JMax, KMax).
• For finite element data, the number of data points is implied by the number of nodes and number of elements.
• Allows you to load blocks of cells that you delimit interactively.
• It is the only option for loading finite element, IJK-ordered, or zone data from Excel. If you want to read data from an Excel spreadsheet into more than one zone, you must use custom format. By default, all data read is put into a single I-ordered zone.
4 - 9.2 Excel Loader Restrictions
A block of data is a rectangular group of numbers in the spreadsheet. The Excel Loader places the following restrictions on blocks:
• Carpet and table format (which the loader detects and loads automatically) are narrowly defined. All other formats must be loaded on the user-defined pathway.
• Numeric cells within each block should contain only numbers or numeric characters such as +, -, and so forth. A cell containing "X=34" is interpreted by the loader as text, because it begins with text.
• Cells containing formulas (therefore displaying calculated values) will be skipped by the loader. You can convert the formulas to values within Excel, by pasting your table using the "Paste Special" function, with "values only" selected.
• The spreadsheet file must have been written by Excel Version 5.0 or higher. For newer versions of Excel (Office 2007 and later) that save in .xslx format by default, please switch to the older .xsl format when saving your file.