Readtable error help?

120 visualizaciones (últimos 30 días)
Leon
Leon el 22 de Mzo. de 2020
Respondida: Ellen el 18 de Nov. de 2023
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
  2 comentarios
Sriram Tadavarty
Sriram Tadavarty el 22 de Mzo. de 2020
Seems like FY20 is not something part of readtable syntax. Can you try removing 'FY20' in the syntax and try, if you are looking for the same?
Leon
Leon el 22 de Mzo. de 2020
Editada: Leon el 22 de Mzo. de 2020
Thanks. FY20 is the worksheet and I just tried the error remains.

Iniciar sesión para comentar.

Respuesta aceptada

Guillaume
Guillaume el 22 de Mzo. de 2020
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);
  1 comentario
Leon
Leon el 22 de Mzo. de 2020
Many thanks!

Iniciar sesión para comentar.

Más respuestas (3)

Agneyan Dileep
Agneyan Dileep el 28 de Jul. de 2020
Error using readtable (line 198)
All parameters must have an associated value.
Error in GTM (line 13)
T = readtable('Data Values.xlsx','Sheet','PreserveVariableNames',true);
I am also getting a similar error. Please help.

ARUNIMA V S
ARUNIMA V S el 14 de Ag. de 2022
clc
clear
data=readmatrix("2011-BC92.csv",2);
x=data(:,1);
y=data(:,2);
plot(x,y);
I'm also getting the same error .. please help

Ellen
Ellen el 18 de Nov. de 2023
I have the same error.
% scroll through file: how many lines are there?
v=readtable(filename,'%s%*[^\n]');
nlines=size(v,1); % total number of lines (including header)
those lines worked in a much older version

Categorías

Más información sobre Entering Commands en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by