exporting from cell to excel

조회 수: 2 (최근 30일)
Wassim Dbouk
Wassim Dbouk 2011년 4월 20일
편집: TED MOSBY 2024년 11월 18일
hi I have a 32000x24 cell array. Whenever I try to export it to excel (using xlswrite) or to csv (using cell2csv) it takes ages as matlab displays a busy signal. Any tip about how to export this file to excel?

답변 (1개)

TED MOSBY
TED MOSBY 2024년 10월 16일
편집: TED MOSBY 2024년 11월 18일
  • Usewritematrixorwritecell:If using a recent version of MATLAB (R2019a or later), try usingwritematrixorwritecellinstead ofxlswrite. These functions are generally faster and more efficient for writing data to files.
% Assuming your data is stored in a variable named 'data'
writecell(data, 'output.xlsx');
  • Split the Data:If possible, split your data into smaller chunks and write them individually.
  • Save as CSV:If Excel format is not a strict requirement, saving as a CSV file can be faster. You can usewritecellorwritematrixfor this purpose:
writecell(data, 'output.csv');
  • Increase MATLAB's Java Heap Memory:If you're running into memory issues, you might consider increasing the Java heap memory in MATLAB. You can do this by going toPreferences > MATLAB > General > Java Heap Memory.
  • Use Parallel Computing:If you have the Parallel Computing Toolbox, you could try to parallelize the export process. This might not be always faster.
Here is the documentation for writeCell and writeMatrix :
Hope this helps!

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by