readtable xlsx with date

1 Ansicht (letzte 30 Tage)
Rica
Rica am 29 Apr. 2019
Kommentiert: Rica am 30 Apr. 2019
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?

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

KSSV
KSSV am 29 Apr. 2019
T = readtable('Test.xlsx') ;

Community Treasure Hunt

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

Start Hunting!

Translated by