Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Extracting data from a matrix to a vector side by side

1 visualizzazione (ultimi 30 giorni)
Jucimar Carpe
Jucimar Carpe il 15 Mag 2020
Chiuso: MATLAB Answer Bot il 20 Ago 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 Commenti
Walter Roberson
Walter Roberson il 16 Mag 2020
xlswrite('relatorio.xlsx', {nome_cliente}, 'Descritivo','G7');
and similar.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by