How to use offset function of excel vba in Matlab coding environment????
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Fangjun Jiang
le 2 Août 2011
Please include some of your code including the creation of the objSheet.
Réponse acceptée
Sean de Wolski
le 2 Août 2011
Matlab indexing starts at 1 not 0.
first_m = objSheet.Range('A:Z').Find('month').offset(1,1).Address;
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!