Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - Русский - 日本語
Scilab Help >> Spreadsheet > readxls

readxls

reads an Excel file

Syntax

sheets = readxls(file_path)

Arguments

file_path

a character string: the path of the Excel file.

sheets

an mlist of type xls, with one field named sheets

Description

Given an Excel file path this function returns an mlist data structure of type xls, with one field named sheets. The sheets field itself contains a list of sheet data structure.

sheet=mlist(['xlssheet','name','text','value'],sheetname,Text,Value) where sheetname is a character string containing the name of the sheet, Text is a matrix of string which contains the cell's strings and Value is a matrix of numbers which contains the cell's values.

Only BIFF8 Excel files (last Excel file version (2003)) are handled.

Examples

Sheets = readxls('SCI/modules/spreadsheet/demos/xls/t1.xls')
// some basic operations on Sheets
typeof(Sheets)
s1=Sheets(1) //get the first sheet
typeof(s1)
s1.value //get the first sheet value field
s1.text  //get the first sheet text field
s1(2,:)  //get the 2 row of the sheet
typeof(s1(2,:))

disp(s1)

See Also

  • xls_open — opens an Excel file for reading
  • xls_read — reads a sheet in an Excel file

Used Functions

This function is based on the Scilab functions xls_open and xls_read.

Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:27:54 CEST 2016