How to import excel sheet with Dates/Time in the first column
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Giancarlo Meccariello
el 10 de Oct. de 2020
Comentada: Walter Roberson
el 12 de Oct. de 2020
Hello,
In the first column I have the dates written as 01.12.2019 00:00 in the other column I have datas as floating numbers.
If I import the excel sheet with "Data=xlsread('Filename') " I don't get the dates and times in the first column instead some random floating numbers.
I need the dates to make a graph with them on the X axis.
please help
2 comentarios
Respuestas (2)
Sudhakar Shinde
el 10 de Oct. de 2020
2 comentarios
Sudhakar Shinde
el 12 de Oct. de 2020
[~,~,raw] = xlsread(filename);
%Extract date column if date is 2 nd column in excel
Date = raw(:,2);
%ignore Date header
Date = raw(2:end,2);
Giancarlo Meccariello
el 12 de Oct. de 2020
2 comentarios
Walter Roberson
el 12 de Oct. de 2020
date_for_plots = datetime(DATA(:,1), 'convertfrom', 'excel');
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!