How to assign a function to an Excel cell
I have been using xlswrite to write Excel functions into cells in an Excel spreadsheet. When opening the spreadsheet the functions evaluate as expected. Now Mathworks is calling xlswrite "not recommended". I’ve been unable to find a way to accomplish the same thing without xlswrite. How can I use another builtin Matlab function to perform the same as the xlswrite?
% Ways to write to Excel
FN = ‘TestFile.xlsx’;
% Put some values into the test file
Vals = num2cell(rand(10,3));
writecell(Vals, FN, ‘range’, ‘a1’);
% Function for an Excel cell
XFunction = {‘=SUM(B1:B10)’};
% This creates a function in Excel that works
xlswrite(FN, XFunction, 1, ‘D1’);
% This does not
writecell(XFunction, FN, ‘Range’, ‘D2’)
winopen(FN)I have been using xlswrite to write Excel functions into cells in an Excel spreadsheet. When opening the spreadsheet the functions evaluate as expected. Now Mathworks is calling xlswrite "not recommended". I’ve been unable to find a way to accomplish the same thing without xlswrite. How can I use another builtin Matlab function to perform the same as the xlswrite?
% Ways to write to Excel
FN = ‘TestFile.xlsx’;
% Put some values into the test file
Vals = num2cell(rand(10,3));
writecell(Vals, FN, ‘range’, ‘a1’);
% Function for an Excel cell
XFunction = {‘=SUM(B1:B10)’};
% This creates a function in Excel that works
xlswrite(FN, XFunction, 1, ‘D1’);
% This does not
writecell(XFunction, FN, ‘Range’, ‘D2’)
winopen(FN) I have been using xlswrite to write Excel functions into cells in an Excel spreadsheet. When opening the spreadsheet the functions evaluate as expected. Now Mathworks is calling xlswrite "not recommended". I’ve been unable to find a way to accomplish the same thing without xlswrite. How can I use another builtin Matlab function to perform the same as the xlswrite?
% Ways to write to Excel
FN = ‘TestFile.xlsx’;
% Put some values into the test file
Vals = num2cell(rand(10,3));
writecell(Vals, FN, ‘range’, ‘a1’);
% Function for an Excel cell
XFunction = {‘=SUM(B1:B10)’};
% This creates a function in Excel that works
xlswrite(FN, XFunction, 1, ‘D1’);
% This does not
writecell(XFunction, FN, ‘Range’, ‘D2’)
winopen(FN) excel, functions MATLAB Answers — New Questions