Hi all, I want to be a able to paste data in any column all at once not cell by in MATLAB APP table.
29 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ali AlMallah
el 4 de Sept. de 2025 a las 14:02
Editada: Ali AlMallah
el 6 de Sept. de 2025 a las 12:25
T_Fixed = table(StartDates_Fixed,EndDates_Fixed,PaymentDates_Fixed,Notional,fixedrate);
app.Details_Fixed.Data = T_Fixed;
app.Details_Fixed.ColumnEditable =true(1,5);
1 comentario
Respuestas (2)
dpb
el 4 de Sept. de 2025 a las 15:52
Editada: dpb
el 4 de Sept. de 2025 a las 22:21
Haven't tried it, but if it is possible, it will be something on the order of
...
tbl=uitable(app.Figure,'Data',T_fixed); % set position, etc., to suit...
tbl.SelectionType='column';
tbl.Multiselect='off'; % select only one column at a time...
tbl.SelectionChangedFcn=@pasteData; % will need other code to ensure have content in clipboard
% Paste clipboard contents for the selected column -- error checking for
% size, type, etc., etc., left as exercise for Student <g>
function pasteDate(src,event)
column=event.Selection;
data=clipboard('paste'); % return clipboard content to local variable
% check size, type here; will have to convert text to numeric as well first
data=convertandverify(data); % whatever it takes goes in here...
src.Data{:,column}=data; % put into selected column; must be cell array
end
Undoubtedly the above won't work first time, but should be the idea if it can be managed to be done...
1 comentario
Ali AlMallah
el 6 de Sept. de 2025 a las 12:24
Editada: Ali AlMallah
el 6 de Sept. de 2025 a las 12:25
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!