필터 지우기
필터 지우기

Compiled Excel add-in Write to Worksheet

조회 수: 1 (최근 30일)
Joseph Long
Joseph Long 2019년 12월 17일
편집: Joseph Long 2019년 12월 17일
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