Direct link to this question
⋮
Direct link to this question
for i=1:10
j[i]=i*5:
end
save['j.mat', 'j']
can i import this j.mat file in excel?
Accepted Answer
Direct link to this answer
⋮
Direct link to this answer
There are several worksarounds to do that, as explained in
Alternatively, you could create an excel file from Matlab using
More Answers [1]
Direct link to this answer
⋮
Direct link to this answer
Not sure if it's feasible to import .mat file directly to excel. However you can save your data from Matlab directly to an xls file using xlswrite[] function.
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
I am trying to open up a .xlsx file from matlab, and have it open in excel. Right now I am using the command open[filename]. This will open the .xlsx in matlab, but i want it opened in excel. The command opentxt[filename] is nice, because it will open a .txt file in notepad. I am looking for something like that for .xls/.xlsx files in excel.
Accepted Answer
More Answers [3]
For Linux/MacOS it is uiopen['file.xlsx'] or just open.
There is no way to open externally but there is a "macopen" function downlodable in file exchange.
Thank you! Exactly what I was looking for.
how can i collect more than workspace in only one?
Main Content
Spreadsheets often contain a mix of numeric and text data as well as variable and row names, which is best represented in MATLAB® as a table. You can import data into a table using the Import Tool or the readtable
function.
Import Spreadsheet Data Using the Import Tool
The Import Tool allows you to import into a table or other data type. For example, read data from the sample spreadsheet file patients.xls
as a table in MATLAB. Open the file using the Import Tool and select options such as the range of data and the output type. Then, click the Import Selection button
Import Spreadsheet Data Using readtable
Alternatively, you can read spreadsheet data into a table using the readtable
function with the file name, for example:
T = readtable['patients.xls'];
You can also select the range of data to import by specifying the range parameter. For example, read the first five rows and columns of the spreadsheet. Specify the range in Excel notation as 'A1:E5'
.
T = readtable['patients.xls','Range','A1:E5']
T = 4×5 table LastName Gender Age Location Height ____________ __________ ___ _____________________________ ______ {'Smith' } {'Male' } 38 {'County General Hospital' } 71 {'Johnson' } {'Male' } 43 {'VA Hospital' } 69 {'Williams'} {'Female'} 38 {'St. Mary's Medical Center'} 64 {'Jones' } {'Female'} 40 {'VA Hospital' } 67
Import Spreadsheet Data as Other Data Types
In addition to tables, you can import your spreadsheet data into the MATLAB workspace as a timetable, a numeric matrix, a cell array, or separate column vectors. Based on the data type you need, use one of these functions.
See Also
Import Tool |
readtable
Related Topics
- Read Spreadsheet Data Using Import Tool
- Read Spreadsheet Data into Table
- Access Data in Tables
- Trial Software
- Trial Software
- Product Updates
- Product Updates