フィルターのクリア

Error using writetable function in Matlab R2017a

13 ビュー (過去 30 日間)
Louise Giansante
Louise Giansante 2017 年 6 月 6 日
回答済み: alexandre iolov 2017 年 10 月 27 日
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 件のコメント
Louise Giansante
Louise Giansante 2017 年 6 月 13 日
Thank you for your comment; however, this error seems to be completely random. If I run my routine again, another error occurs. Also, when I used 2015a version, it didn't happen.
Walter Roberson
Walter Roberson 2017 年 6 月 13 日
Is there a different process also running that is accessing the file?

サインインしてコメントする。

回答 (1 件)

alexandre iolov
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')

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by