I have a problem with a standalone application made with the Matlab compiler. The code in question is
function test
     toXLS = cell(3,3);
     toXLS{1,1} = 'Abcd';
     toXLS{1,2} = 25;
     toXLS{2,1} = 'Defg';
     toXLS{2,2} = 33;
     report=figure('Name','Calculation Results','NumberTitle','off');
     buttonSave = uicontrol(report,'Style','pushbutton','Units','normalized','String','Export to XLS',...
                'Callback',@report2xls,'Position',[0.02 0.02 0.46 0.10]);
     function report2xls(varargin)
        [Save2File,Save2Path] = uiputfile('*.xls','Save As...','OGU.xls');
        Filename = fullfile(Save2Path,Save2File);
        xlswrite(Filename,toXLS);
     end
end
This works just fine when I run it in Matlab, I get a nice Excel file with the cell array data. However, after compiling it takes ages for the xls file to be written (I am talking about 5 min+ on a Quadcore i7) and the generated file is empty. Any ideas what my mistake is?
I have both Office 2010 and Office 2013 installed on the computer, might this be a source of error? Also, after invoking the function above an Excel process remains open in the task manager indefinitely.
Thanks a lot for your help,
Sieghard