Writematrix error exceeds sheet boundaries error

Hello,
Iis there any way to use writematrix (r2020a; excel 16 Mac or 2010 WIN) to write more than 2^16 rows of data (2 cols). Excel help says it can take 2^20 rows but writematrix throws error message if matrix > 2^16 rows.
Thanks,
Andy

6 件のコメント

Andrew Trafford
Andrew Trafford 2020 年 10 月 29 日
writematrix(app.ba', 'test.xls','Sheet', 1, 'Range','A1');
Andrew Trafford
Andrew Trafford 2020 年 10 月 29 日
app.ba' dimensions are 78132*2 double
Andrew Trafford
Andrew Trafford 2020 年 10 月 29 日
Error using writematrix (line 156)
The data block starting at cell 'A1' exceeds the sheet boundaries by 12596
row(s) and 0 column(s).
Mathieu NOE
Mathieu NOE 2020 年 10 月 30 日
hi
I notice you're trying to save in older xls format which is limited to 2^16 = 65536 rows
could you try with xlsx format (the limit should be 2^20 rows)
Walter Roberson
Walter Roberson 2020 年 10 月 30 日
Good point, Mathieu.
Andrew Trafford
Andrew Trafford 2020 年 11 月 1 日
Fantastic, thank you. Hadn't mentally made the link between office versions and 'xls' to 'xlsx'...rookie!

サインインしてコメントする。

 採用された回答

Mathieu NOE
Mathieu NOE 2020 年 10 月 30 日

3 投票

hi again
the proof is here
you're trying to save in older xls format which is limited to 2^16 = 65536 rows
try with xlsx format (the limit should be 2^20 rows)
>> A = rand(2^17,2);
>> writematrix(A, 'test.xls','Sheet', 1, 'Range','A1');
Error using writematrix (line 175)
The data block starting at cell 'A1' exceeds the sheet boundaries by 65536 row(s) and 0 column(s).
>> writematrix(A, 'test.xlsx','Sheet', 1, 'Range','A1');
>>

その他の回答 (0 件)

製品

リリース

R2020a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by