Automatically open certain file types outside MATLAB

Is there a way to tell MATLAB to always open files of certain types outside MATLAB when double clicked in the 'Current Folder' menu, saving me the trouble of right clicking and choosing 'Open Outside MATLAB'?
Thanks

6 件のコメント

Sean de Wolski
Sean de Wolski 2012 年 11 月 7 日
I like this idea.
Brad
Brad 2015 年 9 月 3 日
I agree with Sean. I'm looking for a way to double click on .png files that reside in the current folder, and open them using Windows Photo Viewer.
Monika Jaskolka
Monika Jaskolka 2018 年 9 月 18 日
I am also looking for a way to double-click on Excel spreadsheets and have them actually open in Excel. Instead, I accidentally double-click and have Matlab prompt me to import the data.
Michael Jarboe
Michael Jarboe 2020 年 2 月 6 日
Creating a MatLab App - User enters information - and executes
Output of execution is an Excel file.
I added a Pushbutton 'Open Excel Output File'
% Button pushed function: OpenExcelOutputFileButton
function OpenExcelOutputFileButtonPushed(app, event)
uigetfile([app.PATHNAME app.filename] ,'*.xlsx')
end
MATLAB - CAN THIS BE DONE.PNG
When I click 'Open' in the File Explorer Window - MatLab Comand Window displays - File is NOT opened in Excel
ans =
'Output_File_TEST_ROUTE.xlsx'
How can I have the file be opened in Excel instead of MatLab?
Walter Roberson
Walter Roberson 2020 年 2 月 6 日
uigetfile only fetches the name of a file. You can use fullfile to create the complete file name and call winopen() on that.
IronLikeABrian
IronLikeABrian 2021 年 2 月 25 日
Is there any progress regarding the initial question? I'd also prefere to double-click on Excel files resulting opening Excel.

サインインしてコメントする。

回答 (1 件)

Michael Jarboe
Michael Jarboe 2020 年 2 月 6 日

0 投票

use 'winopen' function - specify full path and filename
%Open Multiple Files
OpenMe.Path{1} = 'C:\Users\YOUR_LOGIN_NAME\Desktop\';
OpenMe.Path{2} = 'C:\Users\YOUR_LOGIN_NAME\Desktop\FOLDER_NAME';
OpenMe.Path{3} = OpenMe.Path{1};
OpenMe.FileName{1} = 'JPEG_IMAGE.jpg';
OpenMe.FileName{2} = 'Excel_File.xlsx';
OpenMe.FileName{3} = 'MS_Word_File.docx';
for i = 1:3
winopen([OpenMe.Path{i} OpenMe.FileName{i}])
end
%Open Specific File
Open_Spec_File = 'C:\Users\YOUR_LOGIN_NAME\Desktop\JPEG_IMAGE.jpg'
winopen(Open_Spec_File)

製品

タグ

質問済み:

2012 年 11 月 7 日

コメント済み:

2021 年 2 月 25 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by