Different date storage type between Mac and Win when reading Excel

I'm currently using function "xlsread" in my Matlab code to import an Excel. The first column of Excel is an array of date.
[data, ~, raw] = xlsread('xxx.xlsx')
When I using the R2018b version on Win, the first column was not imported in the var "data", and in var "raw", it was shown as "cell array".
However, when I using the R2018a version on Mac, the first column was imported in the var "data" and it was shown as an array of 5-digit-numbers.
Do you know the reason? I can't transfer my code between two platforms because of this.

1 Comment

I'd encourage you to use readtable rather than xlsread. It has a lot of new functionality for reading data from Excel files, including better datetime support.
To answer your question in more detail, it will be helpful to see the Excel file.

Sign in to comment.

Answers (0)

Products

Release

R2018a

Asked:

on 18 Aug 2020

Commented:

on 2 Oct 2020

Community Treasure Hunt

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

Start Hunting!