Readtable don't work correctly if 'Range' > 'A250'

조회 수: 2 (최근 30일)
Alexander
Alexander 2022년 7월 1일
편집: Adam Danz 2023년 3월 17일
The command readtable('DruckTest.xlsx','Range','A251') works as expected:
>> Ta = readtable('DruckTest.xlsx','Range','A250');size(Ta),Ta(end,:)
ans =
51 2
ans =
1×2 table
Var1 Var2
___________ ____
07-Mar-2021 1.1
The command readtable('DruckTest.xlsx','Range','A251') issues a strange result:
>> Ta = readtable('DruckTest.xlsx','Range','A251');size(Ta),Ta(end,:)
ans =
0 0
ans =
1×0 empty table
What am I doing wrong? I attached the xlsx. Thanks in advance.

채택된 답변

Adam Danz
Adam Danz 2022년 7월 1일
편집: Adam Danz 2023년 3월 17일
Update: The 250 line limitation is no longer a problem starting in MATLAB R2023a. Thanks for reporting this.
Workaround prior to R2023a
That doesn't sound good.
If you manually grab the import options, that addresses the problem.
opts = spreadsheetImportOptions('DataRange','A251');
Ta = readtable('DruckTest.xlsx',opts)
  댓글 수: 1
Alexander
Alexander 2022년 7월 1일
Thank you Adam, this works. Best regards, Alex.

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by