public static void StopLoading() { if (_loadingText != null) { _loadingText.Delete(); } Globals.ThisAddIn.Application.Interactive = true; }
/// <summary> /// 获取图片的原始宽度和高度 /// </summary> /// <param name="shtPic">工作表</param> /// <param name="rngPic">单元格</param> /// <param name="picPath">图片地址</param> public void GetPicWidthHeight(Excel.Worksheet shtPic, Excel.Range rngPic, string picPath) { sh = shtPic.Shapes.AddPicture( picPath, Office.MsoTriState.msoFalse, Office.MsoTriState.msoCTrue, rngPic.Left, rngPic.Top, -1, -1 ); this.GetPicHeight = sh.Height; this.GetPicWidth = sh.Width; sh.Delete(); }