Borrar filtros
Borrar filtros

How can I use import data function with excel sheet when the excel file is increasing in rows every time

8 visualizaciones (últimos 30 días)
Hi,
I have given an Excel table. This Excel table I have imported with "Import Data" and saved as a cell array as "generate function".
if i add a new row to the excel file the generated import function doesn't deal with the new rows
  1 comentario
Siddharth Bhutiya
Siddharth Bhutiya el 14 de Mzo. de 2023
Import Data simply reads your excel file into MATLAB. So it will read the data that is present in the file when you call the generated function. It is not "syncd" with you Excel file, so if the file is updated and you want the updated version of the file you need to read it again.

Iniciar sesión para comentar.

Respuestas (1)

Cameron
Cameron el 12 de Mzo. de 2023
There are a couple of things you can do. The first is that you can just use the readtable() function instead of using the function created from Import Data. If you need to use the function you created, you'll have to post it because this line
% If row start and end points are not specified, define defaults
if nargin <= 2
dataLines = [2, Inf];
end
of the generated code is the one that is relevant. When you are calling your function, what does it look like? Are you specifying the number of data points within your Excel search?

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by