代码示例:
exl = actxserver('excel.application');
exlWkbk = exl.Workbooks;
exlFile = exlWkbk.Open([docroot '/examples/data.xls']);
exl.Visible=1; %This make the Excel COM server visible
exlSheet1 = exlFile.Sheets.Item('Sheet1');
rngObj = exlSheet1.Range('I2'); %we will add the link to this cell
exlSheet1.HyperLinks.Add(rngObj, 'http://mathworks.com');//超链接里面不能包含空格
exlFile.Save();
exlFile.Close();
exl.Quit;
exl.delete;
转载:https://www.mathworks.com/matlabcentral/answers/22768-add-a-hyperlink-in-excell-through-matlab