MATLAB: Readtable error help

MATLABreadtable

Here is my code and attached is my test.xlsx.
clear all
close all
clc
A = readtable('test.xlsx', 'FY20', 'PreserveVariableNames',true);
Why do I keep getting the below error:
Error using readtable (line 229)
All parameters must have an associated value.
Error in Generate_html (line 5)
A = readtable('test.xlsx', 'FY20', 'PreserveVariableNames',true);
Thanks

Best Answer

I suspect to your 'FY20' is meant to be the sheet name. Unlike xlsread, with readtable the sheet name is passed as a Name-Parameter argument:
A = readtable('test.xlsx', 'Sheet', 'FY20', 'PreserveVariableNames',true);