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

4 views (last 30 days)
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.

Accepted Answer

Adam Danz
Adam Danz on 1 Jul 2022
Edited: Adam Danz on 1 Jul 2022
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 Comment
Alexander Paul
Alexander Paul on 1 Jul 2022
Thank you Adam, this works. Best regards, Alex.

Sign in to comment.

More Answers (0)





Community Treasure Hunt

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

Start Hunting!

Translated by