Date: Mar 8, 2013 3:00 PM
Subject: Re: Importing .xlsx files in parallels

Run this code to convert all .XSLX files in a specific folder, of your choosing, to .XSL files.

Sub Convert_xls_Files()

Dim strFile As String
Dim strPath As String

With Application
.EnableEvents = False
.DisplayAlerts = False
.ScreenUpdating = False
End With
'Turn off events, alerts & screen updating

strPath = "C:\Users\rshuell\Desktop\Excel_Files\"
strFile = Dir(strPath & "*.xls")
'Change the path as required

Do While strFile <> ""
Workbooks.Open (strPath & strFile)
strFile = Mid(strFile, 1, Len(strFile) - 5) & ".xls"
ActiveWorkbook.SaveAs Filename:=strPath & strFile, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close True
strFile = Dir
'Opens the Workbook, set the file name, save in new format and close workbook

With Application
.EnableEvents = True
.DisplayAlerts = True
.ScreenUpdating = True
End With
'Turn on events, alerts & screen updating

End Sub

Try to import the .XLS files into your Matlab.

You won't be able to load them all at once but you could easily use a for-loop to process them one at a time. Something like this:

source_dir = 'path/to/source/'
dest_dir = '/path/to/dest'
source_files = dir(fullfile(source_dir, '*.xls'));
for i = 1:length(source_files)
data = xlsread(fullfile(source_dir, source_files(i).name)));
#do something with data
xlswrite(fullfile(dest_dir, source_files(i).name)));

"Ryan" wrote in message <khdf9n$5pf$>...
> I hate Macs so much!! What exactly is the problem? You need to convert a bunch of XLSX files to XLS files b/c you don't have Matlab 2012a? I can crate an Excel Macro for you to go into all XLSX files in a specific folder, and convert all files to XLS files. Will that do it for you?
> Regards,
> Ryan--
> Gadi Reinhorn <> wrote in message <>...

> > The functionality you need was added in R2012a:
> >
> >
> > xlsread Reads XLSX Files on All Platforms
> >
> > The xlsread function now reads data from XLSX files on all platforms,
> > including support for specifying the range and worksheet number.
> > Previously, this functionality was available only on Microsoft Windows
> > systems with Excel® software.
> >
> >
> > Gadi