tableDatanew = get(handles.uitable4, 'data');
tableDatacoloane = cell2table(tableDatanew);
tableDatacoloane1 = tableDatacoloane{1,2:2};
date = char(tableDatacoloane1);
intrari_a = get(handles.edit3,'String');
intrari_b = get(handles.edit4,'String');
intrari_c = get(handles.edit5,'String');
total = get(handles.edit2,'String');
grafic1 = {date intrari_a intrari_b intrari_c total};
grafic2 = readtable('grafic\grafic.xlsx');
new_data = [grafic2; grafic1];
writetable(new_data, 'grafic\grafic.xlsx','Sheet',1,'Range','A2','WriteVariableNames',0);
A B C D E
____________ ___ ___ ___ ___
'01.02.2021' '1' '3' '2' '6'
A B C D E
____________ ___ ___ ___ ___
'01.02.2021' [1] [3] [2] [6]
'01.02.2021' '1' '3' '2' '6'
Cannot concatenate the table variable 'B' because it is a cell in one table and a non-cell in another.