How to import excel sheet with Dates/Time in the first column
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Sudhakar Shinde
2020 年 10 月 10 日
2 件のコメント
Sudhakar Shinde
2020 年 10 月 12 日
[~,~,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
2020 年 10 月 12 日
2 件のコメント
Walter Roberson
2020 年 10 月 12 日
date_for_plots = datetime(DATA(:,1), 'convertfrom', 'excel');
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!