Compiled Excel add-in Write to Worksheet

1 次查看(过去 30 天)
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)

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by