# Importing Excel data into Matlab



## svampur

Hi, I'm working with a data sheet in Excel where the first line contains the column names and all of the columns contain numbers but one of them contains dates. 

I'm having serious difficulties importing the data into Matlab without messing something up, most often the dates. 

Can anyone help me on this?

Thanks!


----------



## Chrizzzie

svampur said:


> Hi, I'm working with a data sheet in Excel where the first line contains the column names and all of the columns contain numbers but one of them contains dates.
> 
> I'm having serious difficulties importing the data into Matlab without messing something up, most often the dates.
> 
> Can anyone help me on this?
> 
> Thanks!


For importing data in Matlab you need Spreadsheet Link EX. (see: http://www.mathworks.com/products/excellink/) This is a special Toolbox developed to solve these issues. Are you using a student or commercial version? This btw the cheapest Toolbox they’ve.


----------



## shuuhen

Chrizzzie said:


> For importing data in Matlab you need Spreadsheet Link EX. (see: http://www.mathworks.com/products/excellink/) This is a special Toolbox developed to solve these issues. Are you using a student or commercial version? This btw the cheapest Toolbox they’ve.


Actually you can just use a built in function called xlsread(). Spreadsheet Link EX looks to be for using MATLAB _from within_ Excel. You could also open it as a CSV instead of an Excel spreadsheet.

@OP: You'll have to give us an idea of what you're doing to have any idea what is wrong with how you're attempting it (i.e. posting the import code). It has been a while since I've used MATLAB, but you should go to the MATLAB User Guide -> Data Import and Export -> Importing Data -> Importing Excel Spreadsheets. That page has a link to the page (in the same section) on converting dates. You can get to this user guide on the MathWorks site.


----------



## Raikiri

http://www.mathworks.com/access/... - seems 'xlsread(filename)' works just fine.

I take it there are too many lines to just copy/paste them to matlab and create a few arrays lol?


----------

