Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Extracting data from a matrix to a vector side by side

1 vue (au cours des 30 derniers jours)
Jucimar Carpe
Jucimar Carpe le 15 Mai 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
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 commentaires
Walter Roberson
Walter Roberson le 16 Mai 2020
xlswrite('relatorio.xlsx', {nome_cliente}, 'Descritivo','G7');
and similar.
Jucimar Carpe
Jucimar Carpe le 16 Mai 2020
It works!!! Thank you very much.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by