メインコンテンツ

ImportFromFile

Import data from file

Description

DataObjMod = ImportFromFile(DataObj,filename,filetype,sheetname) imports data on sheetname from filename of filetype to your data object.

Before using the method, use CreateData and BeginEdit so that you can add data to the data object.

example

Examples

collapse all

DataObjMod = ImportFromFile(DataObj, filename, filetype)
DataObjMod = ImportFromFile(DataObj, filename, 'Excel file', SHEETNAME)

Input Arguments

collapse all

mbcmodel.data data object.

Input character vector containing the path and name of the file.

Example: 'D:\MBCData\Raw Data\testdata.xls'

Data Types: char

Input character vector containing the file type. For allowed file types, see DataFileTypes.

If you do not enter a filetype, the method uses the file extension to provide the filetype. If the file extension is .xls, then the method uses Excel.

Example: 'Excel file'

Data Types: char

Input character vector containing the sheet name.

Example: 'lb'

Data Types: char

Output Arguments

collapse all

Modified mbcmodel.data object.

Version History

Introduced before R2006a