用VSTO 根据批注,怎样得到单元格的位置,怎么给他付值

hpuer 2007-10-12 03:34:57
用VSTO 根据批注,怎样得到单元格的位置,怎么给他付值,以前用VBA时,根据批注,直接可以给他付值,现在VSTO中好像不可以,也无法确定具体单元格的位置
代码如下: lStrComment = Me.Comments(i).Text 无法确定他的位置
...全文
234 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
微创社(MCC) 2010-05-28
  • 打赏
  • 举报
回复
借VS2010东风,CSDN为啥不搞一个VSTO版快!!!!

【VSTO之家】
http://vsto.5d6d.com

【VSTO专家群】109033523




【VSTO】数据获取
【VSTO】对象起源
【VSTO】MSDN
【VSTO】Backstage View
【VSTO】名人堂
【VSTO】案例
【VSTO】MOSS
【VSTO】Excel Services
【VSTO】Open XML
【VSTO】资源、工具
【VSTO】教学视频
【VSTO】示例代码
【VSTO】Actions Pane
【VSTO】智能标签

...
knowledge_Is_Life 2008-04-30
  • 打赏
  • 举报
回复
lz要干嘛?
panzi667 2007-11-30
  • 打赏
  • 举报
回复
做个记号
v_jzho 2007-10-19
  • 打赏
  • 举报
回复
用Parent属性
C#代码

Excel.Worksheet ws = this.Application.ActiveSheet as Excel.Worksheet;
Excel.Range range = ws.Cells[3, 2] as Excel.Range;
Excel.Comment comment = range.AddComment("This is a test");
Excel.Range commentlocation = comment.Parent as Excel.Range;
MessageBox.Show("Comment:\n" + comment.Text(missing,missing,missing) + "\n" + "locates at:\n" +
"Row:" + commentlocation.Row.ToString() + " Column: " + commentlocation.Column.ToString());
hpuer 2007-10-13
  • 打赏
  • 举报
回复
怎么没人回答呢

5,139

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 Office开发/ VBA
社区管理员
  • Office开发/ VBA社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧