Using writetable for a very large file

17 ビュー (過去 30 日間)
Aishwarya Venkatramani
Aishwarya Venkatramani 2017 年 9 月 1 日
コメント済み: Walter Roberson 2021 年 7 月 31 日
I have a table with around 1323559 lines which I want to write into a .xlsx file.
When I use:
writetable(T,'blabla.xls');
Error: Error using writetable (line 124)
The data block starting at cell 'A1' exceeds the sheet
boundaries by 1323559 row(s) and 0 column(s)
When I use:
writetable(T,'data.xlsx','Sheet',1,'Range','A1:A1323559');
Error: Error using writetable (line 124)
Range input exceeds bounds for this file extension. Row values must be between 1 and 1048576 and
columns values must be between 'A' and 'XFD'.
How do I fix this so I can print the table to an excel file?

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 9 月 1 日
You are asking to write out more rows than are permitted in Excel; the maximum is 2^20, which is 1048576 . If you did somehow manage to write out a .xls or .xlsx file containing all of the rows, then most programs would be unable to read the data.
You should be considering splitting the data into multiple sheets, or using a different file format.
  5 件のコメント
Judith Orinda
Judith Orinda 2021 年 7 月 31 日
This question solved one of my problems! Thank you
Walter Roberson
Walter Roberson 2021 年 7 月 31 日
Excel cannot read csv files that have more than 2^20 rows.

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

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by