IRIS Toolbox Reference Manual

xls2csv

Convert XLS file to CSV file

Syntax

xls2csv(InpFile)
xls2csv(InpFile,OutpFile,...)

Input arguments

Options

Description

This function calls a third-party JavaScript (courtesy of Christopher West). The script uses an MS Excel application on the background, and hence MS Excel must be installed on the computer.

Only one worksheet at a time can be saved to CSV. By default, it is the first worksheet found in the input XLS file; use the option 'sheet=' to control which worksheet will be saved.

See also $irisroot/+thirdparty/xls2csv.js for copyright information.

Example

Save the first worksheets of the following XLS files to CSV files.

xls2csv('myDataFile.xls');
xls2csv('C:\Data\myDataFile.xls');

Example

Save the worksheet named 'Sheet3' to a CSV file; the name of the CSV file will be 'myDataFile.csv'.

xls2csv('myDataFile.xls',[],'sheet=','Sheet3');

Example

Save the second worksheet to a CSV file under the name 'myDataFile_2.csv'.

xls2csv('myDataFile.xls','myDataFile_2.csv,'sheet=',2);