Error using writetable function in Matlab R2017a
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 13 de Jun. de 2017
Is there a different process also running that is accessing the file?
Respuestas (1)
alexandre iolov
el 27 de Oct. de 2017
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 comentarios
Ver también
Categorías
Más información sobre Data Import from MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!