0
我正在使用C#的excel工作,但我在將圖片註釋插入到excel時遇到了一些問題。 這裏是我的代碼:用C#插入圖片評論好的,但複製評論內容失敗
public void InstertPictureComment(Excel.Range myrange, string picturepath)
{
myrange.ClearComment();
myrange.AddComment();
myrange.Comment.Shape.Fill.UserPicture(picturepath);
myrange.Comment.Shape.Width=400;
myrange.Comment.Shapes.Height=300;
}
上面的代碼工作得很好,我可以成功地插入圖片評論。 但是,問題出現了。 複製的內容(與圖片評論我剛剛插入)到其他Excel工作表 ==>保存Excel,並關閉Excel應用 ==>重新打開Excel和一個消息告訴「Excel中發現XXXXX不可讀的內容」
我的代碼有什麼問題?或者這是一個超級問題?