program skills about Microsoft Excel, Word and so on
显示 更早的评论
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 个评论
Stephen
2012-3-26
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
2012-3-27
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Use COM Objects in MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!