 |
 |
BIG PROBLEM ... import EXCEL to MATLAB
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2006
Status:
Offline
|
|
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
|
|
Yeah ... It said that MAC does not use Excel as Com server ...
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: May 2002
Location: Austria
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Hope to receive solution from expert and experient users
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Administrator 
Join Date: Apr 2001
Location: San Antonio TX USA
Status:
Offline
|
|
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
|
|
You guys ... sounds like... old men....Say or Mac or MAC is up to me so thanks for showing off...
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|