How can I import excel file using xlsread if I use Mac?

2 views (last 30 days)
Hi all, I am trying to import an excel file using xlsread. I have converted the file into .xls instead of .xlsx. While importing, I got a warning message saying: "Could not start Excel server for import, 'basic' mode will be used. Refer to HELP XLSREAD for more information." I am aware that this is because in Mac there is no DCOM for Matlab to talk to Excel with. Anyhow, I am still be able to import the data. The only problem is that every single one of them was divided by 1000. For example, if I have a cell with the number of 500, it will show as 0.5000 in Matlab after import. Does anyone know why this happened and how I should address this problem? Thank you in advance!
Jin

Answers (1)

Ken Atwell
Ken Atwell on 3 Oct 2013
That is an unusual problem you are describing. Are you certain that the values imported into MATLAB are divide by 1000, and you're not getting confusion by scientific notation or some such? It can be easy enough to miss if the multiplier has scrolled off the top of the screen. For example:
rand(100,10)*1000000
will give you potentially confusing results since important information will be "above" the top of the screen.
What version are you using? Semi-recent releases of MATLAB (R2012a and beyond) support directly reading .xlsx files on a Mac, so you can skip the conversion step. The odds of an imported .xlsx file exhibiting the same issue as an imported .xls file are quite small (they are powered by completely independent implementations).

Tags

Community Treasure Hunt

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

Start Hunting!