readtable xlsx with date

1 次查看(过去 30 天)
Rica
Rica 2019-4-29
评论: Rica 2019-4-30
Hi every one,
i have data in many excell scheets. I wrote a code to read the sheets:
numVars = 6;
VarSheet=1 ;
varNames = {'Date','Time','M1','T1','L1','L2'} ;
varTypes = {'char','char','char','double','double','double'} ;
dataRange = 'A8:F47';
opts = spreadsheetImportOptions('NumVariables',numVars,'VariableNames',varNames,'VariableTypes',varTypes,'DataRange', dataRange...
'Sheet',VarSheet);
% preview('VergleichsmessungSep3.xlsx',opts)
Meas1 = readtable('Test.xlsx',opts);
How could read Date and Time coulmns and use it for plots?

采纳的回答

Jan
Jan 2019-4-29
编辑:Jan 2019-4-29
What about:
varTypes = {'datetime','datetime','char','double','double','double'} ;
What exactly does "use it for plots" mean?
  3 个评论
Jan
Jan 2019-4-29
@Rica: I'm glad if I could help you.
Please post comments in the section for comments.
Rica
Rica 2019-4-30
Thanks,
I solve it like this:
DT=Date+timeofday(Time).

请先登录,再进行评论。

更多回答(1 个)

KSSV
KSSV 2019-4-29
T = readtable('Test.xlsx') ;

类别

Help CenterFile Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by