Error Importing Excel Data

3 views (last 30 days)
Gillian Murray
Gillian Murray on 9 Jul 2021
Commented: Gillian Murrayon 13 Jul 2021
Just yesterday I was able to import a table with 3 columns, one titled Time with datetime data, the second titled Steps with numeric data, and a third titled ActionType with Out of Work, Sleep, Work, Exercise, and Non-Wear. Now when I go to import it, it says the cells Time and Steps are not importable, but the rest of it is. I tried to get around this by importing just the values for Time and labeling the variable time and doing the same for steps, but when I call bar, I get an error:
S = Steps;
>> T = Time;
>> b = bar(S, T);
Errorusing bar (line 139)
Inputarguments must be numeric, datetime, durationor categorical.
I have no clue what happened, I greatly appreciate any help!

Accepted Answer

KSSV
KSSV on 9 Jul 2021
T = readtable(myfile) ;
S = T.(2);
T = T.(1);
b = bar(S, T);

More Answers (0)

s manbetx 845


Release

R2020a

Community Treasure Hunt

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

Start Hunting!