C# 添加excel批注

public bool AddComent(object coment, int row, int column)
  {
    try
     {
       Excel.Range range = myExcel.get_Range(myExcel.Cells[row, column], myExcel.Cells[row, column]);

      if (range .Comment != null) 
           { 
               range .Comment.Delete(); 
           }
       range.AddComment(coment);
       return true;
     }
   catch
      {
       return false;
      }
   }

 

posted @ 2013-07-06 23:44  EasyPass  阅读(2588)  评论(2编辑  收藏  举报