Unable to read data from my excel file

조회 수: 1 (최근 30일)
Prajwal Venkatesh
Prajwal Venkatesh 2020년 1월 19일
댓글: Walter Roberson 2020년 1월 19일
for i=1:nfiles
datafi{i} = readtable(fullfile(testfiledir, matfiles(i).name));
end
I am reading certain excel files in my folder and certain files are read and certain files no information is read.
I get a blank table for certain excel files.
below picture shows the data that has been read from the excel file, while in the actual excel file there is a lot more informationScreenshot (293).png
Screenshot (292).png
  댓글 수: 3
Prajwal Venkatesh
Prajwal Venkatesh 2020년 1월 19일
it does the job for the rest of the files present in the folder and they are all the same format , just the data change in each document
What do you suggest
Walter Roberson
Walter Roberson 2020년 1월 19일
I suggest adding import options to force the expected headers and columns.

댓글을 달려면 로그인하십시오.

채택된 답변

Prajwal Venkatesh
Prajwal Venkatesh 2020년 1월 19일
I found the problem that the first sheet for this file is different than the rest.
how do i import data based on sheet name?
  댓글 수: 1
Walter Roberson
Walter Roberson 2020년 1월 19일
Pass the 'sheet' option followed by the sheet name.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by