Effacer les filtres
Effacer les filtres

Compiled Excel add-in Write to Worksheet

1 vue (au cours des 30 derniers jours)
Joseph Long
Joseph Long le 17 Déc 2019
Modifié(e) : Joseph Long le 17 Déc 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)

Réponses (0)

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by