How to use an excel sheet as function?
이전 댓글 표시
I have an issues with a massive excel file. I have big excel model which i need to use for data processing. It could be seen as a black box function with a type unit load cases that are combined into one output.
With Matlab I want to send the variable to excel. Have excel calculate it. And then read it out. However the values are not updated in between and hence my output matrix has all the same rows.
How to make sure excel, updates it calculation in between?
While doing it manualy it works fine, but i want to do it for a n of 1000.....
n = 5; %amount of data poin
DC = linspace(0,1,n);
nameXLS ='File.xlsm';
Sheetname = "Calculation"
for i = 1:length(DC)
DCi = DC([i (length(DC)-i+1)])'; % variable prep to 2x1 colomn vector
writematrix(DCi,nameXLS,'Sheet',Sheetname,'range','C31:C32' ); % puts in variable in excel
A(i,:) = readmatrix(nameXLS,'Sheet',Sheetname ,'range','K86:P86' ) %get calcout
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!