mw.fileTypes.open Extension Point
You can specify the default action for opening different file types in MATLAB® using the mw.fileTypes.open extension point.
To specify the default open action for a file type in MATLAB:
Create a JSON-formatted file named
extensions.jsonand place it in a folder namedresources.Add the
mw.schemaVersionproperty as the first property in theextensions.jsonfile and set the value to the schema version for your MATLAB release. For more information about schema versions, see Add Schema Version.Add a set of JSON declarations to
extensions.jsonthat defines the default open action for the file type.Add the folder containing the
resourcesfolder with theextensions.jsonfile to the MATLAB path. To add the folder to the path, use theaddpathfunction or right-click the folder in the Files panel and select Add to Path > Selected Folders and Subfolders.
This JSON code shows the basic structure of the mw.fileTypes.open
extension point.
{
"mw.schemaVersion": "1.0.0",
"mw.fileTypes.open": {
"xlsx": {
"callback": "openxlsx"
},
"docx": {
"callback": "opendocx"
}
}
}For more information about using extension points, see Extend MATLAB Using Extension Points.
Properties
More About
Version History
Introduced in R2026a