How to use offset function of excel vba in Matlab coding environment????
조회 수: 7 (최근 30일)
이전 댓글 표시
thanks!!!
first_m = objSheet.Range('A:Z').Find('month').offset(0,1).Address;
my 'month' is in cell A1, my target cell is A2, my code is listed below.
objExcel = actxserver('excel.application');
set(objExcel, 'Visible',1);
sheetName = 'DPLLC';
objSheet = objExcel.Worksheets.get('Item', sheetName);
first_m = objSheet.Range('A:Z').Find('month').offset(2,1).Address;
but give me error like ??? 'Subscript indices must either be real positive integers or logicals.'
댓글 수: 2
채택된 답변
Sean de Wolski
2011년 8월 2일
Matlab indexing starts at 1 not 0.
first_m = objSheet.Range('A:Z').Find('month').offset(1,1).Address;
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!