Error Importing Excel Data

조회 수: 6 (최근 30일)
Gillian Murray
Gillian Murray 2021년 7월 9일
댓글: Gillian Murray 2021년 7월 13일
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);
Error using bar (line 139)
Input arguments must be numeric, datetime, duration or categorical.
I have no clue what happened, I greatly appreciate any help!

채택된 답변

KSSV
KSSV 2021년 7월 9일
T = readtable(myfile) ;
S = T.(2);
T = T.(1);
b = bar(S, T);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by