1
Я хотел бы сразу удалить все цифры в файле excel из MATLAB. Я могу выбрать все цифры с помощью activex, но я не могу определить способ их удаления.Удалить цифры Excel из Matlab
Мой код:
filename_out = 'Libraries\Documents\TEST.xlsx'; % filename
Excel = actxserver('Excel.Application'); % open the connection
set(Excel,'Visible',1);
Excel.Workbooks.Open(filename_out); % open excel file
worksheets = Excel.sheets;
numSheets = worksheets.Count; % count the number of sheets
for s = 1 : numSheets % do a loop for all sheets
worksheets.Item(s).Shapes.SelectAll; % select the figure
% How to delete selection? *
end
Спасибо за любую помощь!
Спасибо, работает отлично! – cV17
Если вы хотите окончательное полное решение: worksheets = Excel.sheets; numSheets = worksheets.Count; для s = 1: numSheets myshapes = worksheets.Item (s) .Shapes; для j = myshapes.Count: -1: 1 myshapes.Item (j) .Delete конец конец – cV17