write data to excel for more than 26 (A-Z) columns

조회 수: 2 (최근 30일)
Muhammad Usman
Muhammad Usman 2014년 9월 6일
답변: Image Analyst 2014년 9월 6일
I am using xlswrite and wants to write data ranging from A column to ABC column,but when i specify the range A:ABC,i got an error,please help me what should i do.
range = 'A':'ABC'
xlswrite([filename],[my_ftn],sheet1,range)
waiting for someone's reply

채택된 답변

Image Analyst
Image Analyst 2014년 9월 6일
Don't specify the lower right cell, just the upper left, and it will put the whole thing in there:
xlswrite(fullFilename, hugeArray, 'My Results', 'A1');

추가 답변 (1개)

Guillaume
Guillaume 2014년 9월 6일
편집: Guillaume 2014년 9월 6일
Two things:
Your version of excel may be limited to 256 columns, i.e. you can only save range 'A:IV'.
You need to specify a row range as well, otherwise it's going to fill as many rows as excel can handle:
xlswrite(filename, my_ftn, sprintf('A1:BZ%d', size(my_ftn, 1))); %replace BZ by the proper column or calculate it
  댓글 수: 1
Muhammad Usman
Muhammad Usman 2014년 9월 6일
the maximum number of columns in MS Excel 2007 are upto XFD,so what i ll do in matlab now

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

카테고리

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