Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Extracting data from a matrix to a vector side by side
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi folks,
I'm developing a GUI on appdesigner. From a DropDown list, the user will choose an option, then the "description" of this option need to be exported to specific cell on Excel. The problem is that I'm not being sucessfull in this operation because the DropDown list creates a Matrix with it's description, when I exporte the vector the Excel file seems to do not understand and print only the first letter.
escolha_marca_concorrente=app.ConcorrenteDropDown.Value;
if strcmp(escolha_marca_concorrente,'Atlas Copco')
equipamento_concorrente=sprintf(app.AtlasCopcoDropDown.Value)
elseif strcmp(escolha_marca_concorrente,'Ingersoll Rand')
equipamento_concorrente=str2double(app.IngersollRandDropDown.Value);
elseif strcmp(escolha_marca_concorrente,'Chicago')
equipamento_concorrente=str2double(app.ChicagoDropDown.Value);
end
nome_cliente=app.cliente.Value;
nome_contato=app.contato.Value;
nome_email=app.email.Value;
hora_total_dia=horas_fora_ponta+horas_ponta;
horas_fora_ponta_anual=((horas_fora_ponta*dias_semana)+horas_sabado+horas_domingo)*52.1429;
horas_ponta_anual=horas_ponta*dias_semana*52.1429;
xlswrite('relatorio.xlsx',nome_cliente,'Descritivo','G7');
xlswrite('relatorio.xlsx',nome_contato,'Descritivo','G8');
xlswrite('relatorio.xlsx',nome_email,'Descritivo','G9');
xlswrite('relatorio.xlsx',consumo_pcm,'Descritivo','T13');
xlswrite('relatorio.xlsx',hora_total_dia,'Descritivo','K16');
xlswrite('relatorio.xlsx',dias_semana,'Descritivo','K17');
xlswrite('relatorio.xlsx',horas_fora_ponta_anual,'Descritivo','K18');
xlswrite('relatorio.xlsx',horas_ponta_anual,'Descritivo','K19');
xlswrite('relatorio.xlsx', equipamento_concorrente,'Descritivo','R22');
winopen('relatorio.xlsx');
댓글 수: 2
Walter Roberson
2020년 5월 16일
xlswrite('relatorio.xlsx', {nome_cliente}, 'Descritivo','G7');
and similar.
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!