when i load excel file number data read as string in matlab

I use T = readtable('rawtrans1.xlsx') this command to load excel data . but found numeric data type declared in excel read as string in Matlab.So I can't do numeric calculation

5 Comments

Kakoli - can you convert to a number using str2double? I see that T is a table so presumably you are accessing a certain row or column from it...
It would help to see the file.
If the numbers are stored as TEXT in the spreadsheet, READTABLE will read those as text. Otherwise, I'd expect those to be imported as DOUBLE.
No it can't work; it shows NAN
I'm having the same problem and I have the format for that column in Excel as number. I tried cientific too..but nothing..readtable is reading the values as string. Did you figure it out two years ago @KAKOLI DEY?
As Jeremy said, we can be of more help if you share your file. Attach your spreadsheet to your post using the paperclip icon.
Otherwise, take a look at this page.

Sign in to comment.

Answers (0)

Asked:

on 15 Mar 2018

Edited:

on 18 Feb 2021

Community Treasure Hunt

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

Start Hunting!