Write in Excel file huge matrix

4 次查看(过去 30 天)
Hi everyone,
I am looking for a way to write/import HUGE matrix in an Excel file, or equivalent software. The concerned matrix are cell arrays, have more than 14.000.000 rows and a couple columns, containing strings. I tried different things:
-the famous 'xlswrite' but it only writes 65.000 rows. I tried to iterate with a for loop, but Excel is not able to find higher indexed cells like 'A500000', so that solution does not work this way.
-use a csv file but the problem is the same: even if Matlab tells me it works, when I open the csv file, I can only see around 1.000.000 rows, the rest is not displayed.
-use commands with 'actxserver' but nothing to do, the matrix are too heavy and my computer was about to crash.
Excel is not a requirement, but clearly the most practical software to show and manipulate my results. Any ideas?
Regards,
Antoine
  4 个评论
Antoine Guilleux
Antoine Guilleux 2018-8-14
编辑:Antoine Guilleux 2018-8-14
Ok fine Stephen, thanks! I'll try something else then, my mentor told me to try with FlexPro for example, it can also be used for that apparently (but don't know its limits yet...).
Stephen23
Stephen23 2018-8-14
编辑:Stephen23 2018-8-14
"And I don't know why"
Because the .mat file standards pre 7.3 have a limit of 2^31 bytes per variable, or smaller:

请先登录,再进行评论。

采纳的回答

Stephen23
Stephen23 2018-8-14
编辑:Stephen23 2018-8-14
Excel simply cannot display that many rows, no matter how much you want it to.
"...even if Matlab tells me it works, when I open the csv file, I can only see around 1.000.000 rows, the rest is not displayed."
Excel 2007 and later versions only support up to 1048576 rows, well short of what you need. There is no way to get Excel to show more rows than it supports. So this problem has nothing to do with MATLAB, it is simply how Excel is made:
"use commands with 'actxserver' but nothing to do, the matrix are too heavy and my computer was about to crash"
I would not recommend using any Excel document for storing this much data. A simple CSV file would be much more reliable, or multiple CSV files. You should to use something that does not load all of the data into memory at once... such as MATLAB tall arrays:
Or use matfile with a version 7.3 or later .mat file (limited only by the total number of bytes, not by how many rows of data).
You should read what the MATLAB documentation advises about big data:

更多回答(0 个)

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by