What is the best way to write a duration type to an Excel file?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jason Nicholson
el 14 de En. de 2016
Comentada: Jason Nicholson
el 28 de Dic. de 2020
I have an array of duration type. I want to write it to Excel and then use it as a time in excel. Is there a recommended way to get this effect?
d = duration([24;25],[0;10],[10;17]);
xlswrite('Example.xlsb', d);
If you write the d to Excel, the spreadsheet will not contain any version of the duration information in d.
0 comentarios
Respuesta aceptada
Lars Abrahamsson
el 23 de Dic. de 2020
What about the other function to create Excel files from tables?
writetable
1 comentario
Más respuestas (1)
Walter Roberson
el 14 de En. de 2016
Editada: Walter Roberson
el 23 de Dic. de 2020
So write a serial date number which is the duration in days (and fraction of a day). You may wish to go in with ActiveX and apply a time format to the cell.
0 comentarios
Ver también
Categorías
Más información sobre Spreadsheets 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!