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

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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

제품

릴리스

R2018a

질문:

2020년 8월 18일

댓글:

2020년 10월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by