Import excel file destroy the date vector and convert them to numeric number
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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
0 Commenti
Risposte (1)
Guillaume
il 19 Ago 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.
0 Commenti
Vedere anche
Categorie
Scopri di più su Data Import from MATLAB in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!