I am currently running MATLAB R2013a on OSX and am attempting to write the contents of a cell array into a specified cell of an .xlsx file in Excel 2011 for Mac. When I first tried using the built-in MATLAB function xlswrite
, I was unsuccessful, and after doing a bit of digging, I came to the conclusion that this function would not work as I needed because actxserver
is not supported on my Mac. Therefore, I did a bit of research online and found the xlwrite
function here.
After downloading the package, I am successfully able to use this code to write the contents of a cell array into a specified cell of my .xlsx file, however, I've run into a problem. How do I get the contents of the cell I am editing to keep the previous .xlsx formatting of the cell? For example, the blank cell I am writing into is set to bold Cambria font size 10, but when I run this code, the contents of the cell change to non-bold Calibri (Body) font size 12. I've tried changing the Excel default font setting, but it always reverts to Calibri (Body) font size 12. Is there a trick to keep the formatting the same? Thanks for the help!