matlab salvar automaticamente o arquivo excel usando a interface activex

Eu tenho um código no matlab. Depois de executar meu programa, um arquivo 'example2.xlsx' foi criado.

Agora eu tenho o código abaixo e quero que o matlab substitua o atual 'example2.xlsx' pelo novo 'example2.xlsx' (salvando automaticamente sem me perguntar se eu quero substituí-lo):

e = actxserver ('Excel.Application'); % # open Activex server
filename = fullfile(pwd,'example2.xlsx'); % # full path required
ewb = e.Workbooks.Open(filename); % # open the file
esh = ewb.ActiveSheet;


str = num2str(num_rows+1);
esh.Range(strcat('J',str)).Interior.Color = clr;

sheet1 = e.Worksheets.get('Item', 'Sheet1');
range1 = get(sheet1,'Range', strcat('A',str),strcat('I',str));
range1.Value = values{num_rows+1};

[num, txt, raw] = xlsread('example2.xlsx');
num_rows = length(num(:,1));


xlWorkbookDefault = 51; % # it's the Excel constant, not sure how to pass it other way
ewb.SaveAs(fullfile(pwd,'example2'), xlWorkbookDefault)
ewb.Close(false)
e.Quit
e.delete