2.7.13 files2dc

Menu Information

Connect Multiple Files

Brief Information

Create data connection to multiple files

Additional Information

Minimum Origin Version Required: 2020b

Command Line Usage

1. string fname$="C:\examples\Gasoline 1.mat%(CRLF)C:\examples\Gasoline 2.mat%(CRLF)C:\examples\Gasoline 3.mat"; files2dc dc:=MATLAB;

2. files2dc dc:=CSV fname:="%Ytest2.csv%(CRLF)%Ytest1.csv" samebk:=1 dlg:=1;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Data Connector dc

Input

string

Specify the file type of Data Connector.
File Names fname

Input

string

fname$
Specify the files to be imported. Full path should be included.
Same Book samebk

Input

int

0
This checkbox is available if the selected Connector type supports importing multiple files in the same workbook, CSV Connector for example.
Open Dialog for First File dlg

Input

int

0
Whether to open the Selection dialog for the first file.

Description

This X-Function is used to connect multiple files at the same time. Currently limited connector types are supported, such as CSV and Excel Connectors for workbook, Matlab, MetroPro, and WDF Connectors for matrix. For some types like CSV Connector, you can specify to import multiple files into the same workbook. During import, you can open the Selection dialog for the first file to specify the import settings. The rest files will follow this settings.