How to use offset function of excel vba in Matlab coding environment????
3 ビュー (過去 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 件のコメント
Fangjun Jiang
2011 年 8 月 2 日
Please include some of your code including the creation of the objSheet.
採用された回答
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 で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!