Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > BIG PROBLEM ... import EXCEL to MATLAB

BIG PROBLEM ... import EXCEL to MATLAB
Thread Tools
Fresh-Faced Recruit
Join Date: Aug 2006
Status: Offline
Reply With Quote
Aug 16, 2006, 04:41 PM
 
Hi,
I know how to import a part of Excel file into Matlab by using the command: xlsread
However, it just works for Win OS ... I have asked many friends and many experts about how to import a part of Excel file into Matlab in MAC and UNIX OS and up to now the answer have been "No Way and No Idea" ...
So I wonder how we can do it in MAC OS ...

Best regards,
Student123
     
Fresh-Faced Recruit
Join Date: Aug 2006
Status: Offline
Reply With Quote
Aug 18, 2006, 01:25 PM
 
Yeah ... It said that MAC does not use Excel as Com server ...
     
Senior User
Join Date: May 2002
Location: Austria
Status: Offline
Reply With Quote
Aug 18, 2006, 03:47 PM
 
Simple answer: It's not possible to import just a part of an Excel file into Matlab with xlsread on Mac OS X or UNIX.


You can import the whole file with xlsread or, if you really want to import only a part of it, open it with Excel, save it as Lotus-1-2-3 .WK1 file instead of .xls and then use Matlab's wk1read command to import it. The wk1read command has the same features on Windows, Mac and UNIX.
     
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Aug 18, 2006, 04:15 PM
 
The only thing I'd be concerned about, Tsilou B., is that the conversion to Lotus and then the read function might lose something in the Excel file. Is it your experience that formatting, data and formulas come through intact? I've had problems with Excel conversions through other Office apps on Windows (which is supposed to be all integrated and perfectly harmonious, etc.) losing anything from the number formatting in a column all the way through losing whole colums, so I'm kind of curious about how well this works.
Glenn -----
OTR/L, MOT, Tx
     
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Aug 19, 2006, 08:16 AM
 
Ack, why note export it as comma-separated values, anyhow? If you're versed in matlab you should be quite wary of keeping your data in a proprietary format like Excel anyway.
     
Professional Poster
Join Date: Jun 2001
Location: Northwest Ohio
Status: Offline
Reply With Quote
Aug 19, 2006, 09:10 AM
 
Originally Posted by student123
Yeah ... It said that MAC does not use Excel as Com server ...
Tip:

"Mac" instead of "MAC"

It's not all capitalized unless you're talking about "Media Access Control."
     
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Aug 19, 2006, 09:30 AM
 
Originally Posted by Mithras
Ack, why note export it as comma-separated values, anyhow? If you're versed in matlab you should be quite wary of keeping your data in a proprietary format like Excel anyway.
Great point. CSV should give you a text equivalent of all the data in a very common and easy to use format-I can't think of anything that doesn't have some equivalent of CSV, and it's really hard to mess up text...
Glenn -----
OTR/L, MOT, Tx
     
Fresh-Faced Recruit
Join Date: Aug 2006
Status: Offline
Reply With Quote
Aug 19, 2006, 10:27 AM
 
But the point is ... we want to save data in Excel and do some calculations and functions ... then import the calculated data into Matlab.
I really appreciate your advice and idea. Hope to have a solution for this problem ... many people in our office reject to use MAC 'cauze they believe that Excel and Matlab do not work well in mac (and they gave this PROBLEM as AN EXAMPLE) .....
     
Fresh-Faced Recruit
Join Date: Aug 2006
Status: Offline
Reply With Quote
Aug 22, 2006, 06:39 PM
 
Hope to receive solution from expert and experient users
     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Aug 22, 2006, 06:49 PM
 
Originally Posted by Person Man
Tip:

"Mac" instead of "MAC"

It's not all capitalized unless you're talking about "Media Access Control."
http://www.charlessoft.com/extraneou.../bobsguide.gif

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Aug 22, 2006, 07:09 PM
 
Calculate in Excel and generate results in Excel. Export the results to Matlab-possibly as a CSV so NOTHING gets lost. Where's the problem here?

Really, isn't this straightforward and fool-proof enough?
Glenn -----
OTR/L, MOT, Tx
     
Fresh-Faced Recruit
Join Date: Aug 2006
Status: Offline
Reply With Quote
Aug 28, 2006, 12:21 AM
 
You guys ... sounds like... old men....Say or Mac or MAC is up to me so thanks for showing off...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:48 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2