Writetable does not allow me to have more than 32 columns in my table!

조회 수: 2 (최근 30일)
Milad Zarei
Milad Zarei 2017년 9월 13일
댓글: Fangjun Jiang 2017년 9월 14일
I am trying to export an Excel table using writetable commend, but it gives me this error:
Error using writetable (line 117)
The data block starting at cell 'A1' exceeds the sheet boundaries by 0 row(s) and 32 column(s).
Do you have any ideas how to fix this? Thanks :)
  댓글 수: 4
Walter Roberson
Walter Roberson 2017년 9월 13일
>> filename = 'test.xlsx';
>> Tab1 = randn(101, 288);
writetable(Tab1,filename,'sheet',1,'Range','A1')
Undefined function 'write' for input arguments of type 'double'.
Error in writetable (line 124)
write(a,filename,varargin{:})
>> Tab1 = table(Tab1)
Tab1 =
101×1 table
Tab1
______________
[1x288 double]
[1x288 double]
...
>> writetable(Tab1,filename,'sheet',1,'Range','A1')
>>
This suggests that your test case is not an accurate reflection of your actual usage.
Walter Roberson
Walter Roberson 2017년 9월 14일
What extension are you using for the file name?

댓글을 달려면 로그인하십시오.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2017년 9월 13일
You may have a quite old version of Microsoft Office, in which the Excel has a limit of 256 columns. Try some data with less number of columns to see if the error message still exists.
  댓글 수: 3
Image Analyst
Image Analyst 2017년 9월 13일
So simply upgrade your Excel. Can't you do that? If not, write to a csv file instead.
Fangjun Jiang
Fangjun Jiang 2017년 9월 14일
Excel 2007 already has a column limit of 16384. Make sure you don't set the save option as "save to 97-2003 XLS format". Follow menu
File, Options, Save

댓글을 달려면 로그인하십시오.

카테고리

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