Import excel file destroy the date vector and convert them to numeric number

1 visualización (últimos 30 días)
I am using matlab 2014a on Macintosh, when i am import Excel file into MATLAB the dates vector destroy and convert it to numeric number. when i do the same on PC the dates in the excel file stay the same as date and not destroy. what is the problem why there is different between the PC and the macintosh, and how i can fix it to work good on Macintosh.
code i am using:
File_Name ='SPX_Index.xlsx'; Load_DATA=dataset('XLSFIle',File_Name,'sheet',1);
thanks

Respuestas (1)

Guillaume
Guillaume el 19 de Ag. de 2016
On a Windows computer with excel installed, matlab talks directly to excel to load the file. On a Windows computer without excel installed or on non-Windows computer this is not possible and a completely different method is used to load excel files. Matlab parses the file directly instead.
A downside of that is that indeed, excel dates are imported as excel serial date numbers. Here is a post on how to convert these numbers back to dates.

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by