Borrar filtros
Borrar filtros

Compiled Excel add-in Write to Worksheet

1 visualización (últimos 30 días)
Joseph Long
Joseph Long el 17 de Dic. de 2019
Editada: Joseph Long el 17 de Dic. de 2019
I have a function to be compiled and used as an Excel add-in. From within this function I need to write to a worksheet in the ActiveWorkbook. Below is a simple function I'm using to test with:
function writeResults(Periods, Loans1, PmtFreq, TermYrs, InvPeriodYrs, ReInvPeriodYrs, MaxInvestCap, Recycle_Permitted, Recycle_Percentage, A, B, trials)
N = trials;
h = waitbar(0, 'Please wait...');
% run the simulation
for n = 1:N
%This is a call to another matlab function
Investment_mat(Periods, Loans1, ...
PmtFreq, TermYrs, InvPeriodYrs, ReInvPeriodYrs, MaxInvestCap, Recycle_Permitted, ...
Recycle_Percentage, A, B);
% waitbar
waitbar(n/N, h, ['Number of the test: ' num2str(n)])
%After each interation I want to write a result to a given range on a specific worksheet
end
% close the waitbar
close(h)

Respuestas (0)

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by