¥Øªº: ±NÀx¦s®æ¤º®eÂà¥X²M·¡¤å¦r¤§¹Ï¤ùÀÉ
²{ªp°ÝÃD: ¥i¿é¥X¹Ï¤ùÀÉ , ¦ý¤º®e¤£°÷²M·¡
1.¥Ø«e¥i±NEXCELÀx¦s®æ¿é¥X¬°¹Ï¤ù¤§VBA»yªk,¦ý¿é¥X¤§¸ÑªR«×¤£¨Î
2.¦ý¬OìÀx¦s®æ¤ºªº¤º®e¤SµLªk°µ²§°Ê,¦rÊ^Åܤj©ÎÀx¦s®æ«½s±Æ , ²§°Ê»Ýnªá¶O¼ÆÓ¤ë¤j¶q¤u®É«·s±Æª©
3.ºô¸ôª¦¤å¬d¥i¥H¥[¤J©ñ¤j¤ñ¨Òªº¥\¯à , ¦ý¥u¦³¹Ï®ØÅܤj
.ShapeRange.ScaleWidth 1.1, 0
4.·Q½Ð±Ð¦U¦ì¥ý¶i,¦³µL¥i´£¤É¿é¥X¹Ï¥Ü¸ÑªR«×¤§¤èªk
Sub Ex()
Dim Rng As Range
'«ü©wªº½d³ò
Set Rng = Range("D3:G9")
Rng.CopyPicture Format:=xlBitmap
'·s¼W ¹Ïªí
With ActiveSheet.ChartObjects.Add(1, 1, Rng.Width, Rng.Height)
.ShapeRange.ScaleWidth 1.1, 0
.ShapeRange.ScaleHeight 1.1, 0
'¶K¤W ¹Ï¤ù
.Chart.Paste
'¶×¥X ¹Ï¤ù
.Chart.Export Filename:="D:\Test.Png"
'§R°£ ¹Ïªí
.Delete
End With
End Sub |