Error using writetable function in Matlab R2017a
조회 수: 13 (최근 30일)
이전 댓글 표시
Hello,
I've just started working with a trial version of Matlab R2017a. I've been using the same code I worked with in the latest version, Matlab R2015a, but it is not working in R2017a. I need to save an excel file in the end of the code, but it appears to happen several different errors every time I run it. As part of the code I added a function that is only available in Matlab R2017 and therefore I cannot work with the older version anymore. Can somebody, please, help me? Have you seen something similar?
One of the errors, for instance:
"The range must be a character vector of the form 'A1:B2' or 'A1'."
But if you check my code:
filename = 'planilha.xlsx';
writetable(T,filename,'Sheet',1,'Range','A1')
I defined a range.
Another random error if I run the program again:
Disable sheet protection, disable workbook's Mark as Final option, and ensure input does not exceed cell capacity.
As you can see it is not only one error, but it is completely random.
I'll be glad if someone can help me.
댓글 수: 3
답변 (1개)
alexandre iolov
2017년 10월 27일
I just received this error out-of-the-blue, when writing a 9x9 table to a perfectly non-existing .xlsx (or .xls) file. It turns out that the cause is that i have very large dates (sentinels for infinity) e.g. this will blow up
dt = utcdatetime(9999, 12, 31, 23,59,60)
T = array2table(dt)
writetable(T, 'BigDate.xls')
This will not
dt = utcdatetime(9999, 12, 31, 23,59,59)
T = array2table(dt)
writetable(T, 'BigDate.xls')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!