How do I read (hours) data from the .xlsx file?
4 ビュー (過去 30 日間)
古いコメントを表示
stelios loizidis
2021 年 2 月 10 日
コメント済み: stelios loizidis
2021 年 2 月 10 日
Hello,
I have the following issue. In a .xlsx file I have in column D hours (format: 00: 00: 00,01: 00: 00, ... 23:00:00). How can I integrate (read) them into the code to use them to plot some graphics I want. Your help is important.
0 件のコメント
採用された回答
Walter Roberson
2021 年 2 月 10 日
[~,~,ALL_Data]=xlsread('Hours_Data.xlsx');
Hours = days(cell2mat(ALL_Data(2:25,end)));
Hours.Format = 'hh:mm';
Hours
%OR
ALL_Data = readtable('Hours_Data.xlsx');
Hours = days(ALL_Data{:,end});
Hours.Format = 'hh:mm';
Hours
その他の回答 (1 件)
KSSV
2021 年 2 月 10 日
Read about readtable. In here after reading your specify the format of time. Have a look on duration.
7 件のコメント
Walter Roberson
2021 年 2 月 10 日
If the answer is NO, that you have technical problems or legal restrictions that prevent you from uploading a small sample file, then just say so, and we will provide additional steps to figure out exactly what is happening. But if you were hoping for an answer soon and there is no technical or legal restriction to uploading a small sample file then upload a small sample file
We. Need. To. See. Exactly. What. Is. Stored. In. The. File.
Not what an image of it looks like. Excel permits many different kinds of data to be displayed as the same thing.
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!