필터 지우기
필터 지우기

Will it be possible to use XLSWRITE to write formulas to the excel sheet which would be calculated altomatically when they are written?

조회 수: 36 (최근 30일)
I need to create an XLS sheet from MATLAB using the XLSWRITE command. However, I want to export data and the cell formulas to the xls sheet
For example, I might want to write to a cell:
cell F5: =sum(F1:F4)
Would this be possible when I use the XLSWRITE Command?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
You can write formulas to cells as regular strings. Below are some commands that can be used for declaring a cell array and then writing it to Excel.
a={'1','2','=sum(a1,b1)'}
a(2,:)={'4' '5' '=sum(a2,b2)'}
a(3,:)={4, 5 ,'=sum(a3,b3)'}
xlswrite('Book2.xls',a)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품


릴리스

R2008a

Community Treasure Hunt

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

Start Hunting!

Translated by