Reading Tables: h5readTableΒΆ
h5readTable reads rows from an HDF5 table. There are variants for reading a subset of columns or reading a contiguous or strided range of rows.
Excel UDF Syntax
h5readTable(filename, tablename)
h5readTable(filename, tablename [, columns, first, last, step])
Mandatory Arguments
Argument | Description |
---|---|
filename | A text string specifying the name of an HDF5 file |
tablename | A text string (path) specifying the location of an HDF5 table |
Optional Arguments
Argument | Description |
---|---|
columns | An array of text strings specifying the columns to be read |
first | An integer specifying the first row to be read |
last | An integer specifying the last row to be read |
step | An integer specifying the number of rows to skip for each read row. |
Return Value
On success, h5readTable populates a cell range with a the requested table rows. The first row of the range contains the table heading (column names).
On error, an error message (string) is returned.
Examples
Read tick data from September 22, 2011.
h5readTable("tickdata.h5", "/22-09-2011")
Sample the tickdata and read only every 10th value.
h5readTable("tickdata.h5", "/22-09-2011", , , , 10)
Read the timestamp and ask only.
h5readTable("tickdata.h5", "/22-09-2011", {"Time", "Ask"})
Read only ticks between rows 1,000 and 15,000.
h5readTable("tickdata.h5", "/22-09-2011", , 1000, 15000)
Error Conditions
The following conditions will create an error:
- An invalid file name
- An empty string or a string that contains characters not supported by the operating system
- It refers to a file system location for which the user has insufficient access privileges
- An invalid table name
- An empty string
- No HDF5 object exists at the specified location
- The HDF5 object at the specified location is not an HDF5 table
- The number of rows requested exceeds the maximum Excel row count
- An invalid column selection
- An empty array
- A column name that is not defined in the HDF5 table
- An invalid first row index
- The argument is not empty and not a non-negative integer
- An invalid last row index
- The argument is not empty and not a non-negative integer
- An invalid step
- The argument is not empty and not a positive integer
See Also