Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

fread_xls (MathScript RT Module Function)

LabVIEW 2011 MathScript RT Module Help

Edition Date: June 2011

Part Number: 373123B-01

»View Product Info

Owning Class: support

Requires: MathScript RT Module (Windows)

Syntax

fread_xls(file)

fread_xls(file, sheet)

fread_xls(file, sheet, range)

a = fread_xls(file)

a = fread_xls(file, sheet)

a = fread_xls(file, sheet, range)

Legacy Name: xlsread

Description

Reads data from a Microsoft Excel spreadsheet file.

Details

Examples

Inputs

Name Description
file Specifies the Excel file you want to read. file is a string.
sheet Specifies the spreadsheet in file you want to read. sheet can be an integer that specifies the index of a spreadsheet or a string that specifies the name of a spreadsheet. If you do not specify sheet, LabVIEW reads data from the first spreadsheet in file.
range Specifies the range of data in sheet you want to read. range is a string. If you do not specify range, LabVIEW reads all data from sheet.

Outputs

Name Description
a Returns the data LabVIEW reads from file.

Details

If you want to read data from a single cell, you can use a cell number, such as 'A1', to specify the range. If you want to read data from a block of cells, you can use a colon as a range operator to specify the range. For example, you can specify 'A1:B3', where A1 and B3 specify the top left and bottom right cells of the block of cells from which you want to read data. If you use a range operator to specify the range or if you do not specify a range, all call data in the range must be scalar. Otherwise, this function returns NaN.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

a = magic(3);
fwrite_xls('test', a);
pause(1)
b = fread_xls('test')

Related Topics

fwrite_xls


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit