Excel file generate function using import data error

Hi,
I'm very new to Matlab and have to use the import data generate function to import an excel file with multiple sheets.
However when I try to create this function it comes up with a long function and when I run it, I receive an error:
Not enough input arguments.
Error in importfile3 (line 25);
if nargin == 1 || isempty(sheetName)
This is the beginning of the script:
%% Input handling
% If no sheet is specified, read first sheet
if nargin == 1 || isempty(sheetName)
sheetName = 1;
end
% If row start and end points are not specified, define defaults
if nargin <= 2
dataLines = [3, 22];
end
I have no idea how to fix this problem and could really use some help.

1 Kommentar

Hi Jose,
Can you share the function definition of the import function that you are using?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Gefragt:

am 8 Mär. 2021

Kommentiert:

am 11 Mär. 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by