Reading string from an exel file using xlsread

Hello Everyone, How are you?
Well, I'm trying to read a Exel file with Missing Values using xlsread, but when I run the code, the date column is save as a number.
>> [a,b,c] = xlsread('001_xlsx.xlsx',1, 'B6:F12'); >> a
a =
1.0e+04 *
4.2433 0.0005 0.0005 0.0601 0
4.2433 0.0005 0.0005 0.0598 0
4.2433 0.0005 0.0004 0.0604 0
4.2433 0.0005 0.0003 0.0582 0
4.2433 0.0005 0.0003 0.0589 0
4.2433 0.0005 0.0002 0.0595 0
4.2433 0.0005 0.0002 0.0595 0
>> b
b =
{}
>> c
c =
[4.2433e+04] [4.6700] [5.2000] [601.0680] [0]
[4.2433e+04] [4.6600] [4.6000] [597.9430] [0]
[4.2433e+04] [4.6800] [3.7000] [604.1940] [0]
[4.2433e+04] [4.6100] [3.4000] [582.3580] [0]
[4.2433e+04] [4.6300] [2.8000] [588.5880] [0]
[4.2433e+04] [4.6500] [2.2000] [594.8170] [0]
[4.2433e+04] [4.6500] [1.8000] [594.8170] [0]
Dates in the exel file have this format (single column),
ans =
3/4/16 0:47
3/4/16 1:47
3/4/16 2:47
3/4/16 3:47
3/4/16 4:47
3/4/16 5:47
3/4/16 6:47
My questions, is how can I save that column as a string?, in that way, I can use datenum to convert that time format.
Thanks.

2 件のコメント

Walter Roberson
Walter Roberson 2016 年 7 月 4 日
Your file is inconsistent. "Nro" 2136 and above have the date in "General" format, but 2137 and below have the date in custom date format.
David du Preez
David du Preez 2016 年 7 月 5 日

サインインしてコメントする。

回答 (0 件)

製品

質問済み:

2016 年 7 月 4 日

コメント済み:

2016 年 7 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by