From: TideMan <>
Newsgroups: comp.soft-sys.matlab
Subject: =?windows-1252?Q?Re=3A_What_is_the_best_way_to_import_Excel_files=2C_with?=
Date: Thu, 26 Apr 2012 16:38:33 -0700 (PDT)
Lines: 37
Message-ID: <10550607.643.1335483513669.JavaMail.geo-discussion-forums@pbbpz9>
References: <jnc9v7$1ot$>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-Trace: 1335483514 3261 (26 Apr 2012 23:38:34 GMT)
NNTP-Posting-Date: Thu, 26 Apr 2012 23:38:34 +0000 (UTC)
Cc: Ryan <>
In-Reply-To: <jnc9v7$1ot$>
Injection-Info:; posting-host=;
User-Agent: G2/1.0
Xref: comp.soft-sys.matlab:766076

On Friday, April 27, 2012 8:08:07 AM UTC+12, Ryan  wrote:
> What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit)
> I’m trying to import historical prices of stock data. Matlab keeps cutting off the header of each column; it gives me only values. I am thinking that this is a data-type-mixing-issue, or whatever it’s called.
> I have ‘Dates’ in ColumnA, and ‘MSFT’, ‘PWER’, ‘KO’, and ‘SBUX’, in ColumnB-ColumnE.
> Basically, if I put the Excel file in my Matlab folder and double-click the file, I see the values in a matrix (no dates and no headers), I hit ‘Next’. Then, I see only one option; one radio button is enabled – ‘Create variable matching preview’. The other two options, ‘Create vectors from each column using column names’ and ‘Create vectors from each row using row names’ – both are greyed out. I’ve seen videos, on YouTube and on the Matlab site, where people import excel data and these options are NOT greyed out. No matter what I do, there options are ALWAYS greyed out. The problem is, when I click ‘Finish’ in my ‘Workspace’ I have a variable named ‘data’ all values in a 575x4 matrix, but I have NO DATES and I have NO HEADERS on the columns. All of this seems to go into another variable, called ‘textdata’; all dates and headers ate in textdata. This is VERY inconvenient. I’m trying to 
> analyze some stock data and I have no headers, so I have no idea which stock is which (I can figure it out, but I think Matlab should do this for me). Also, I have no dates corresponding to the historical stock prices. This is VERY weird. How can I pull in test and values together? 
> I have a sample file here:

Why not revert to the old-fashioned way:
will give the numerical data in a matrix a and everything else as a cell array in b.