program skills about Microsoft Excel, Word and so on
Show older comments
hi everybody,
I have some questions about MS Excel when used it in Matlab. For example, I wanna move the cursor into next cell, like move current cell to (iRow, iColumn) cell. In VBA, its syntax is like
hActiveSheet.Cells(iRow, iColumn).Select
where hActiveSheet is the handle of active sheet. So how do I use it in Matlab?
When I used it like VBA ayntax, an error occured if iRow > 1 or iColumn > 1... when iRow=1,iColumn=1, the whole sheet is selected...
Is there any suggestion? or is there any book introducing
such item?
Any help or suggestion is appreciated!
2 Comments
Stephen
on 26 Mar 2012
Here is some code that I use to access the data from cells A1 to A5 using ActiveX. The variable Activesheet is the excel worksheet as you might imagine.
get(Activesheet, 'Range', 'A1', 'A5')
Perhaps you could use this syntax with "set" instead of "get" to move the range around.
w sq
on 27 Mar 2012
Accepted Answer
More Answers (0)
Categories
Find more on Use COM Objects in MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!