Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey all. I need your help if you please.
I am entering a dynamic data into excel sheet from a textbox.
the problem is that it enters letter by letter in every cell.
thanks in advance

What I have tried:

VB
function bntEnterData_callback(hObject,eventdata,handles)
val1 = get(handles.txt1,'string'));
val2 = get(handles.txt2,'string'));
val3 = get(handles.txt3,'string'));
values = [ val1 val2 val3]
filename= 'try.xls';
sheet= 1;
xkRange= 'A2';
xlswrite(filename,values,sheet,xlRange);
Posted
Updated 8-Dec-17 0:10am
v2

1 solution

I think you need the cell variant instead of the array variant :
values = { val1 val2 val3};
See here for more details:
Write Microsoft Excel spreadsheet file - MATLAB xlswrite - MathWorks Nordic[^]
 
Share this answer
 
Comments
Member 12796416 20-Nov-18 2:59am    
thank you very much

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900